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

AWSとGo言語とコンテナによる証券プラットフォーム

 AWSとGo言語とコンテナによる証券プラットフォーム

atsushi-ishibashi

March 20, 2019
Tweet

More Decks by atsushi-ishibashi

Other Decks in Technology

Transcript

  1. . 5 ͜ͷ՝୊Λղܾ͢ΔͨΊզʑ͸4FSWJDFʗ#JHEBUBʗ 1MBUGPSNΛ։ൃ͠ࡾҐҰମͰۚ༥Λ4FSWJDFͱͯ͠࠶ൃ໌͢Δ ࿪Μͩ#VTJOFTTϞσϧ ϚΠφεͳސ٬ମݧ ۚ༥αʔϏε6* 69 #UP$#UP#UP$Ͱͷ ۚ༥ϑϩϯταʔϏε։ൃɻ

    ূ݊γεςϜ#BB4 ূ݊γεςϜΛ"1*αʔϏεԽ͠ɺ ূ݊ϏδωεϓϥοτϑΥʔϜΛఏڙ େखϔοδϑΝϯυ౳ػؔ౤ࢿՈ޲͚ʹσʔλαʔϏεΛఏڙɻ Ϗοάσʔλղੳ
  2. GoݴޠʹΑΔίϯςφӡ༻ • ECSʹΑΔΦʔτώʔϦϯά / ΫϥελͷASGʹΑΔߏ੒ →؆୯ʹ௵ͤΔ؀ڥ • awslogsʹΑͬͯඪ४ग़ྗͰCWLʹϩάΛू໿ →ϝτϦΫεϑΟϧλʔ΍KinesisͷLambdaͰΞϓϦέʔ γϣϯϩάʹΦϯϥΠϯϨεϙϯεɻexport

    taskͰS3ʹύʔ ςΟγϣϯ෼ׂͯ͠ు͖ग़͠ • cronॲཧΛCWEͰϚωʔδυ؅ཧ →CLIͰઃఆ͞ΕͯΔcron jobͷҰཡԽ͕༰қʂ • NO SSH • Goͩͱίϯςφখͯ͘͞Dockerfile΋΄΅ςϯϓϨԽ͢Δ
  3. ɾେମ্͕ͷΑ͏ͳDockerfileͰॻ͚Δ ɾΠϝʔδαΠζ΋10MB͘Β͍ FROM golang:alpine as builder ENV APPDIR $GOPATH/src/example RUN

    \ apk update && \ rm -rf /var/cache/apk/* && \ mkdir -p $APPDIR ADD . $APPDIR/ WORKDIR $APPDIR RUN go build -ldflags “-s -w” -o example FROM alpine RUN apk add —no-cache ca-certificates COPY —-from=builder /go/src/example/example /usr/local/bin/ ENTRYPOINT [“example”]
  4. ·ͱΊ • ͱʹ͔͘ίϯςφΦʔέετϨʔγϣϯ ྑ͍Α • ೝূ / ೝՄ͸͓΋͠Ζ͍͕ɺαʔϏεཁ ݅ʹ߹Θͤͯબ୒͠Α͏ •

    AWS͕ΠϯλʔωοτʹͳΔͱྑ͍ͳ(?) • Finatext͸ۚ༥ʹڵຯ͋ΔΤϯδχΞΛ ืूͯ͠·͢ʂʂ