Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
いまからDockerで始めるGitLab CE/gitlabjp-20170919
Search
Kunihiro Morita
September 19, 2017
Technology
1
1.3k
いまからDockerで始めるGitLab CE/gitlabjp-20170919
GitLab Meetup Fukuoka #1 の資料です。
https://gitlab-jp.connpass.com/event/64349/
Kunihiro Morita
September 19, 2017
Tweet
Share
More Decks by Kunihiro Morita
See All by Kunihiro Morita
絵で覚える AWS 全 (?) サービス入門 〜 できるAWSカルタ 〜/jawsug-20191019
morita92hiro
1
2.3k
決戦用MSセンチネル/alterbooth-20190606
morita92hiro
1
240
勝手にAlibaba Cloud White Beltシリーズ Elastic Compute Service(ECS)/alieaters-20190301
morita92hiro
0
390
夏休みで差がつく!Ansible/ansiblejp-20180803
morita92hiro
2
2.6k
希望のRancher〜コンテナをアウフヘーベン〜/ranchermeetup-20171006
morita92hiro
0
270
月額10円から作るServerless Website〜Azure編〜/serverlessfukuoka-20170825
morita92hiro
8
16k
コンテナ運用いきのこるには/ranchermeetup-20170807
morita92hiro
1
560
AWS Summit Tokyoをお探しですか?/jawsug-20170713
morita92hiro
0
160
ブラウザだけでインフラ操作?〜これさえあれば、何もいらない。〜/fukuazu-20170622
morita92hiro
1
890
Other Decks in Technology
See All in Technology
【若手エンジニア応援LT会】AWSで繋がり、共に成長! ~コミュニティ活動と新人教育への挑戦~
kazushi_ohata
0
160
プロダクトチームへのSystem Risk Records導入・運用事例の紹介/Introduction and Case Studies on Implementing and Operating System Risk Records for Product Teams
taddy_919
1
160
VPC間の接続方法を整理してみた #自治体クラウド勉強会
non97
1
570
わたしとトラックポイント / TrackPoint tips
masahirokawahara
1
240
小規模に始めるデータメッシュとデータガバナンスの実践
kimujun
3
550
pandasはPolarsに性能面で追いつき追い越せるのか
vaaaaanquish
4
3.8k
ABEMA のコンテンツ制作を最適化!生成 AI x クラウド映像編集システム / abema-ai-editor
cyberagentdevelopers
PRO
1
180
プロダクトエンジニアが活躍する環境を作りたくて 事業責任者になった話 ~プロダクトエンジニアの行き着く先~
gimupop
1
440
Apple/Google/Amazonの決済システムの違いを踏まえた定期購読課金システムの構築 / abema-billing-system
cyberagentdevelopers
PRO
1
210
[AWS JAPAN 生成AIハッカソン] Dialog の紹介
yoshimi0227
0
140
生成AIと知識グラフの相互利用に基づく文書解析
koujikozaki
1
130
で、ValhallaのValue Classってどうなったの?
skrb
1
660
Featured
See All Featured
Visualization
eitanlees
144
15k
The Pragmatic Product Professional
lauravandoore
31
6.3k
Git: the NoSQL Database
bkeepers
PRO
425
64k
実際に使うSQLの書き方 徹底解説 / pgcon21j-tutorial
soudai
167
49k
Java REST API Framework Comparison - PWX 2021
mraible
PRO
28
7.9k
Into the Great Unknown - MozCon
thekraken
31
1.5k
A Tale of Four Properties
chriscoyier
156
23k
What's new in Ruby 2.0
geeforr
342
31k
Build The Right Thing And Hit Your Dates
maggiecrowley
32
2.4k
Reflections from 52 weeks, 52 projects
jeffersonlam
346
20k
Producing Creativity
orderedlist
PRO
341
39k
The Language of Interfaces
destraynor
154
24k
Transcript
͍·͔ΒDockerͰ࢝ΊΔ GitLab CE #gitlabjp 2017/9/19 GitLab Meetup Fukuoka #1 1
ా༟ גࣜձࣾΦϧλʔϒʔε ιϦϡʔγϣϯΞʔΩςΫτ @morita92hiro http://hawaku.hateblo.jp 2017/9/19 GitLab Meetup Fukuoka #1
2
About GitLab GitLab unifies issues, code review, CI and CD
into a single UI — https://about.gitlab.com 2017/9/19 GitLab Meetup Fukuoka #1 3
Products 2017/9/19 GitLab Meetup Fukuoka #1 4
GitLab CE/EE1 ηϧϑϗεςΟϯά » Community Edition (CE) <- ࠓ͜ͷ »
Enterprise Edition (EE) » Starter (EES) » Premium (EEP) 1 https://about.gitlab.com/products/ 2017/9/19 GitLab Meetup Fukuoka #1 5
GitLab.com2 SaaS » Free (EES૬) » Bronze » Silver »
Gold 2 https://about.gitlab.com/gitlab-com/ 2017/9/19 GitLab Meetup Fukuoka #1 6
2017.1. 2017/9/19 GitLab Meetup Fukuoka #1 7
2017/9/19 GitLab Meetup Fukuoka #1 8
ʊਓਓਓਓਓਓʊ ʼɹಥવͷࢮɹʻ ʉY^Y^Y^Y^Yʉ 2017/9/19 GitLab Meetup Fukuoka #1 9
ϫΠແࣄࢮ! 2017/9/19 GitLab Meetup Fukuoka #1 10
ࢮʁ » ݸਓతʹAnsibleపఈೖͷݪߘΛཧ͍ͯͨ͠ ͍ʹ » ࠷৽σʔλϩʔΧϧʹ͍ͬͯͨ » ෮چΛԹ͔͍ͰݟΕͨ 2017/9/19 GitLab
Meetup Fukuoka #1 11
ͦͷஔ͍ͱ͍ͯ 2017/9/19 GitLab Meetup Fukuoka #1 12
GitLab CEͷ͓ 2017/9/19 GitLab Meetup Fukuoka #1 13
GitLab CE Features1 » Built-in CI/CD » Cycle Analytics »
Issue Boards » Time tracking » Preview your changes with Review Apps » Publish static websites for free with GitLab Pages 1 https://about.gitlab.com/products/ 2017/9/19 GitLab Meetup Fukuoka #1 14
GitLab Install3 3 https://about.gitlab.com/installation/ 2017/9/19 GitLab Meetup Fukuoka #1 15
Install Methods » apt / yum » Docker <- ࠓ͜ͷ
» Azure VM / AWS AMI / GCP VM » ͘͞ΒͷVPSʮελʔτΞοϓεΫϦϓτʯ<- NEW4 » Ansible Playbook » ͳͲͳͲ 4 https://vps-news.sakura.ad.jp/2017/08/29/startup-gitlab/ 2017/9/19 GitLab Meetup Fukuoka #1 16
Omnibus package installation » ਪ » GitLabશ෦ » ඞཁΞϓϦέʔγϣϯ(Ruby, Nginx,
PostgreSQLͳͲ)ಉࠝ 2017/9/19 GitLab Meetup Fukuoka #1 17
Docker Image5 » Offical » GitLab CE » GitLab EE
» GitLab Runner » based on the Omnibus package 5 https://docs.gitlab.com/ce/install/docker.html 2017/9/19 GitLab Meetup Fukuoka #1 18
Docker Run 2017/9/19 GitLab Meetup Fukuoka #1 19
docker run -d \ -h gitlab.example.com \ -p 80:80 -p
443:443 \ --name gitlab \ --restart always \ -v $PWD/gl_env/etc/gitlab/:/etc/gitlab \ -v $PWD/gl_env/var/log/gitlab:/var/log/gitlab \ -v $PWD/gl_env/var/opt/gitlab:/var/opt/gitlab \ gitlab/gitlab-ce:latest 2017/9/19 GitLab Meetup Fukuoka #1 20
ઃఆ มߋ docker exec -it gitlab vim /etc/gitlab/gitlab.rb ө docker
restart gitlab 2017/9/19 GitLab Meetup Fukuoka #1 21
Docker Compose 2017/9/19 GitLab Meetup Fukuoka #1 22
version: '2' services: gitlab: image: "gitlab/gitlab-ce:latest" restart: always hostname: "gitlab.example.com"
environment: GITLAB_OMNIBUS_CONFIG: | external_url 'http://gitlab.example.com' gitlab_rails['gitlab_shell_ssh_port'] = 22 ports: - "80:80" - "22:22" volumes: - "./gl_env/etc/gitlab:/etc/gitlab" - "./gl_env/var/log/gitlab:/var/log/gitlab" - "./gl_env/var/opt/gitlab:/var/opt/gitlab" 2017/9/19 GitLab Meetup Fukuoka #1 23
ϙʔτ൪߸ » HTTP(80) » HTTPS(443) » SSH(22) 2017/9/19 GitLab Meetup
Fukuoka #1 24
ϙʔτมߋ6 HTTP(S) external_url 'http://gitlab.example.com:8080' external_url 'https://gitlab.example.com:8443' SSH gitlab_rails['gitlab_shell_ssh_port'] = 2224
6 https://docs.gitlab.com/omnibus/docker/README.html#install-gitlab-using-docker-compose 2017/9/19 GitLab Meetup Fukuoka #1 25
version: '2' services: gitlab: image: "gitlab/gitlab-ce:latest" restart: always hostname: "gitlab.example.com"
environment: GITLAB_OMNIBUS_CONFIG: | external_url 'https://gitlab.example.com:8443' gitlab_rails['gitlab_shell_ssh_port'] = 2224 ports: - "8443:8443" - "2224:22" volumes: - "./gl_env/etc/gitlab:/etc/gitlab" - "./gl_env/var/log/gitlab:/var/log/gitlab" - "./gl_env/var/opt/gitlab:/var/opt/gitlab" 2017/9/19 GitLab Meetup Fukuoka #1 26
GitLab Runner 2017/9/19 GitLab Meetup Fukuoka #1 27
http://www.slidedeck.io/codethebuild/slides 2017/9/19 GitLab Meetup Fukuoka #1 28
version: '2' services: gitlab: ʙলུʙ runner: image: gitlab/gitlab-runner:latest restart: always
volumes: - "/var/run/docker.sock:/var/run/docker.sock" - "./gl_env/etc/gitlab-runner:/etc/gitlab-runner" 2017/9/19 GitLab Meetup Fukuoka #1 29
ઃఆ11 docker exec -it gitlab_runner_1 gitlab-runner register 11 https://docs.gitlab.com/runner/register/#docker 2017/9/19
GitLab Meetup Fukuoka #1 30
͋ͱɺ͜ΕΛ͜͏ͯ͠… » Container Registory7 » SMTP (SendGrid)8 » OAuth (AzureAD)9
9 https://docs.gitlab.com/ce/integration/azure.html 8 https://docs.gitlab.com/omnibus/settings/smtp.html 7 https://docs.gitlab.com/ce/administration/container_registry.html#configure-container-registry-under-an- existing-gitlab-domain 2017/9/19 GitLab Meetup Fukuoka #1 31
͜͏͡Όʂ 2017/9/19 GitLab Meetup Fukuoka #1 32
Multi Sites 2017/9/19 GitLab Meetup Fukuoka #1 33
Nginx Proxy10 + Let's Encrypt 10 https://docs.gitlab.com/omnibus/settings/nginx.html#change-the-default-proxy-headers 2017/9/19 GitLab Meetup
Fukuoka #1 34
·ͱΊ » ߏஙapt / yum, DockerͰ؆୯ » ΞοϓσʔτDockerӡ༻ͷํָ͕ » ηϧϑϗεςΟϯάGitLab-CE/EE
» ϗεςΟϯάෆཁͳΒSaaSͷGitLab.comָ͕ » 1ͭͷUIͰIssusɺίʔυϨϏϡʔɺContainer Registory, CI/CDΛ ཧͰ͖ΔͷͰָ 2017/9/19 GitLab Meetup Fukuoka #1 35
͓ΘΓ 2017/9/19 GitLab Meetup Fukuoka #1 36