Upgrade to Pro — share decks privately, control downloads, hide ads and more …

테스트 환경 개선하기

RIDI
November 02, 2018

테스트 환경 개선하기

RIDI

November 02, 2018
Tweet

More Decks by RIDI

Other Decks in Programming

Transcript

  1. పझ౟ജ҃ѐࢶೞӝ
    IUUQTUFTUSJEJJP
    झషয౱੢൞੤

    View full-size slide

  2. ӝദ ٣੗ੋ ѐߊ ߓನ
    ੉Ѣ૓૞ߓನ೧بظਃ
    ѣ੿ࠛউ

    View full-size slide

  3. ࠛউਸহগ۰ݶ
    పझ౟о೙ਃ೤פ׮

    View full-size slide

  4. ਬ׫పझ౟ ా೤పझ౟
    &&పझ౟١j
    2"
    ஹೊఠ
    ઁೠػജ҃

    ࢎۈ

    ׮নೠജ҃

    View full-size slide

  5. ѐߊ੗੄۽ஸࢲߡী٣੗੉ցо੽ࣘೞ۰ݶ
    %FWFMPQFS %FTJHOFS

    View full-size slide

  6. %FWFMPQFS %FTJHOFS
    IUUQTYY

    View full-size slide

  7. ٣੗ੋ12о૓೯غחزউ

    ׮ܲѐߊਸ҅ࣘೞҊर׮ݶ
    ܻ࠙ػపझ౟ࢲߡ೙ਃ

    View full-size slide

  8. झషয౱੄ӝઓജ҃
    IFFKBFEFWSJEJJP
    OOZBNNEFWSJEJJP
    TJNQTPOEFWSJEJJP
    j
    ѐੋ߹ࢲ࠳بݫੋ ࣻز
    ࢤࢿ

    View full-size slide

  9. ޙઁ੼ઁೠػ44)੽ࣘӂೠ
    44)
    ࢸ੿౵ੌসؘ੉౟ ࠽٘ޙઁ٣ߡӦ١
    ૒੽؀਽ࠛо

    View full-size slide

  10. ޙઁ੼63-ਸాೠ࠽٘
    IUUQHJUIFFKBFEFWSJEJJPGFUDI
    IUUQHJUIFFKBFEFWSJEJJPDIFDLPVUGFBUVSF"
    IUUQHJUIFFKBFEFWSJEJJPQVMM
    IUUQHJUIFFKBFEFWSJEJJPTVCNPEVMFVQEBUF
    IUUQNBLFIFFKBFEFWSJEJJPCVJME
    ൞੤שউ߄ՈѢ
    эইਃ
    દ࣠೧ਃƕƕ

    ׮द࠽٘೧ࠅѱਃ

    View full-size slide

  11. ޙઁ੼بݫੋࠗ઒
    ૑Әపझ౟ࢲߡ
    উॳदח࠙҅ࣁਃ
    ઁԁ
    ׮ॳ࣑যਃ

    View full-size slide

  12. नӏపझ౟ࢲߡҳ୷
    ೐ۿ౟ূ٘࠙ӝ݃ੌझహ

    View full-size slide

  13. ਃҳࢎ೦
    • ৈ۞ѐ੄ ࢲ࠳ بݫੋ ࢤࢿ੉ оמ೧ঠ ೣ
    • п ࢲ࠳ بݫੋ߹۽ ة݀੸ੋ ߓನо оמ೧ঠ ೣ
    • admin ಕ੉૑ب ੽ࣘ оמ೧ঠ ೣ
    • పझ౟ ࢲߡী ૒੽ SSH ੽Ӕ оמ೧ঠ ೣ
    • ࢎղীࢲ݅ ੽ࣘೡ ࣻ ੓যঠ ೣ
    • Ҋ੿ػ بݫੋ (ex : library.dev.ridi.io)
    • ௢ఃח ܖ౟ بݫੋী ࢸ੿
    • ౠ੿ ࠳ے஖ী ؀೧ ୭न ܻ࠺੹੉ ੗زਵ۽ ߈৔
    • SSL ੋૐࢲ ੸ਊ
    • పझ౟ ജ҃ীࢲ ఋ౱੄ API ௒ী ޙઁо হযঠ ೣ

    View full-size slide

  14. ޙઁ੼ઁೠػ44)੽ࣘӂೠ
    ޙઁ੼63-ਸాೠ࠽٘
    ޙઁ੼بݫੋࠗ઒
    ӝઓࢲߡ৬ܻ࠙ػੋझఢझࢎਊ
    $*ীࢲبழ੉޷૑۽࠽٘
    ࢲ࠳بݫੋࢤࢿਸ੗ਬ܂ѱ

    View full-size slide

  15. ӝࣿझఖѾ੿
    %PDLFS &$4

    View full-size slide

  16. بழоજ׮חѤ઱ਕٜযࠊࢲঌѷחؘ
    ߔূ٘بழۄ੉૚਷যڌѱೞ૑

    View full-size slide

  17. &$4j
    ż@ż
    ॄࠄ"84ۄҊח&$ 4 3PVUF
    JNBHF
    DPOUBJOFS
    UBTLEFGJOJUJPO
    TFSWJDF
    DMVTUFS
    UBTL

    View full-size slide

  18. GPPUFTUSJEJJP
    &$44FSWJDF

    $POUBJOFS

    "-#
    &$4ࢲ࠺झীبݫੋਸোѾೞ۰ݶ
    CBSUFTUSJEJJP
    &$44FSWJDF "-#
    OFXUFTUSJEJJP
    /FX4FSWJDF "-#

    View full-size slide

  19. UFTUSJEJJP "-#
    ੉ۧѱೡࣻহਸө
    GFBUVSF"UFTUSJEJJP
    GFBUVSF#UFTUSJEJJP
    CVHGJY"UFTUSJEJJP
    CVHGJY#UFTUSJEJJP
    /FX

    7JSUVBM)PTU

    View full-size slide

  20. ੉ۧѱೡࣻহਸө
    3FWFSTF1SPYZ
    "1*4FSWFS,FZWBMVF4UPSF
    8FC6*
    jNPSF

    View full-size slide

  21. য۵׮
    ழझఠ݃੉૚ೞӝ
    ௿ۄ੉঱౟ܳ ؀नೞৈ ׮ܲ ࢲߡীࢲ ੗ਗਸ оઉ য়ח ࢲߡੑפ׮.

    View full-size slide

  22. FDTHFO
    EPDLFSHFOGPS"84&$4
    *OTQJSFECZEPDLFSHFOFDTHFOMFUTZPVHFOFSBUFDPOGJHGJMFTGSPNUFNQMBUFT
    VTJOH"84&$4DMVTUFSJOGPSNBUJPOFDTOHJOYQSPYZVTFTFDTHFOUPHFOFSBUF
    OHJOYDPOGJHGJMFT
    $POUJOVPVTMZVQEBUFBDPOGJH
    5PLFFQBDPOGJHVQUPEBUFUSZBWBSJBUJPOPGUIFGPMMPXJOH
    $ ecs-gen --signal="nginx -s reload” --template=nginx.tmpl --output=/etc/nginx/
    conf.d/default.conf
    IUUQTHJUIVCDPNDPEFTVLJFDTHFO

    View full-size slide

  23. HJUMBCSJEJJPTUPSFFDTOHJOYQSPYZ
    ஶప੉ցী೙ਃೠ౵ੌѐ
    "1* MVBOHJOYNPEVMF

    8FC6*
    3FWFSTF1SPYZ
    ,FZWBMVF4UPSF

    View full-size slide

  24. 1045DSFBUF
    (&5WIPTUT

    View full-size slide

  25. ੉ઁ ௿۞झఠী

    ࢲ࠺झ ஶప੉ց
    ݅ڸ਋ݶ
    ঌইࢲ׮೧સפ׮

    View full-size slide

  26. ࢤࢿ সؘ੉౟ ઙܐ
    (JUMBC$*$%1JQFMJOF&OWJSPONFOUT

    View full-size slide

  27. ࢤࢿ সؘ੉౟ ઙܐ
    (JUQVTI
    UFTUSJEJJP"1*
    (JU-BC$*5SJHHFSप೯
    %PDLFSCVJME&$3QVTI
    4MBDL/PUJGZ
    FDTDMJDPNQPTFTFSWJDFVQ
    UFTUSJEJJP8FC6*
    &OWJSPONFOUTUPQ
    1JQFMJOF.BOVBMKPCप೯
    FDTDMJDPNQPTFTFSWJDFEPXO
    4MBDL/PUJGZ
    #SBODI࢏ઁ

    View full-size slide

  28. ਘੌҕѐ
    ੘সӝрѐਘƕƕ

    View full-size slide

  29. ইएਛ؍੼୶о۽ѐࢶ೧ঠೡࠗ࠙
    ডѐਘ੄੘সӝрࣗਃ

    "84৬%PDLFS੄ࢎ੹૑ध੉୽࠙೮׮ݶ

    ѐਘউ౷ਵ۽оמ೮ਸѪਵ۽৘࢚

    BXTMBCTFDTOHJOYSFWFSTFQSPYZ

    ѐੋѐߊ੗о݅ٚFDTOHJOYQSPYZܳ

    BXTMBCTীࢲ݅ٚۄ੉࠳۞ܻ۽߸҃

    View full-size slide

  30. ՘
    ੉ݶજѷ૑݅ƕƕ

    View full-size slide

  31. ޙઁоթই੓঻णפ׮

    View full-size slide

  32. IUUQTUFTUSJEJJP
    IUUQTGFBUVSF"UFTUSJEJJP
    IUUQTTUBUJDGFBUVSF"UFTUSJEJJP
    IUUQTTFMFDUGFBUVSF"UFTUSJEJJP
    IUUQTBENJOGFBUVSF"UFTUSJEJJP
    ੋૐࢲ ߊә߉חѱޤоয۵׮Ҋ
    IUUQTGFBUVSF#UFTUSJEJJP
    IUUQTTUBUJDGFBUVSF#UFTUSJEJJP
    IUUQTTFMFDUGFBUVSF#UFTUSJEJJP
    IUUQTBENJOGFBUVSF#UFTUSJEJJP

    View full-size slide

  33. %ZOBNJD8JMEDBSE
    $FSUJGJDBUFT
    QTӒրઁоࠢੋ੉ܴੑפ׮Ѩ࢝೧ب߹Ѣউա৬ਃ

    View full-size slide

  34. աܴѐߊҙ۲झೖ஖ੋؘ௏٘ೠ઴হਵݶ
    ೲ੹ೡөࠊળ࠺೮णפ׮

    View full-size slide

  35. "-#ܻझցীੋૐࢲ୶о
    ecs-cli compose service up
    aws acm request-certificate --domain-name ${VHOST}
    --validation-method DNS --subject-alternative-names *.${VHOST}
    while true
    do
    sleep 2.5s
    OPTIONS=`aws acm describe-certificate --certificate-arn ${ARN} |
    jq .Certificate.DomainValidationOptions`
    [ `echo ${OPTIONS} | jq 'map(select(.ResourceRecord)) |
    length'` -gt 0 ] && break;
    done
    BATCH=`echo ${OPTIONS} | jq .[0] | jq --arg action UPSERT -f batch.jq`
    aws route53 change-resource-record-sets --change-batch "${BATCH}"
    ࢲ࠳بݫੋFDTTFSWJDFTࢤࢿ
    "$.ੋૐࢲߊәਃ୒
    بݫੋࣗਬӂੋૐ
    ੋૐࢲߊә৮ܐ؀ӝ
    aws acm wait certificate-validated --certificate-arn ${ARN}
    aws elbv2 add-listener-certificates --listener-arn ${LISTENER}
    --certificates CertificateArn=${ARN}

    View full-size slide

  36. ՘
    ૓૞՘੉ীਃ

    View full-size slide

  37. хࢎ೤פ׮

    View full-size slide