SlideShare a Scribd company logo
Aug, 2018
Takahiro Yamaki
EC Marketplace RMS Development Department
Rakuten, Inc.
2
2. System relation map
3
Reference: https://blog.netapp.com/blogs/containers-vs-vms/
More info!
Docker merit
Small size
Effective resource sharing
High speed spin up
… etc.
4
Application
Docker Image
Base
Docker Image
•
• …
•
• …
•
• …
Environment variables are
attached at booting
1st step
2nd step
5
FROM php/apache:latest
: "Application directories“ && ¥
mkdir -p /project/public && ¥
: "Application User“ && ¥
groupadd -g 10000 hoge && ¥
useradd -u 10001 -g hoge -s /bin/bash hogeuser && ¥
: "Owner change" && ¥
chown -R hogeuser:hoge /project/public
COPY ./init.sh /opt/docker/provision/entrypoint.d/
ENV WEB_DOCUMENT_ROOT /project/public
$ sudo docker build –t hoge-application-base:1.0 .
Infrastructure as code !!!
Public images
6Reference: https://hub.docker.com/
You don’t need to make
these servers from
scratch anymore!
7
FROM hoge-application-base:1.0
COPY ./sample-app/public /project/public/
$ sudo docker build -t hoge-application:1.0 .
Application release steps as code
8
{"env": {
“A-API-URL":"http://stg-aaa-api.jp.local/1.1.0"
,”AAA-API-KEY”:”abcdefg”
…
env.json
runtimi.conf
CPU=0.1
MEM=1024
INSTANCES=1
….
9
Application
Image
Base
Image
Base
Image
Snapshot Ver.
Application
Image
Base
Image
Release ver.
DEV env. STG(QA) env. PRO env.
+DEV conf +STG conf +PROD conf
Local env.
+ Local conf
codes
Container management platformDocker-compose
Quality assured
docker image will be
deployed to PROD
env after QA test.
Differences are
only config files
10
Is it necessary to maintain your server construction manual?
11
Is it necessary to maintain your server construction manual?
 No!!! Infrastructure as code!!!
FROM tomcat:8.0-jre8
: "Application directories“ && ¥
mkdir -p /project/public && ¥
: "Application User“ && ¥
….
Base Dockerfile ver 1 Base Dockerfile ver 2
FROM tomcat:8.0-jre8
: "Application directories“ && ¥
mkdir -p /project/public && ¥
mkdir -p /var/log/aaa && ¥
: "Application User“ && ¥
….
12
How long is it likely take for a new joiner to start his/her coding?
13
How long is it likely take for a new joiner to start his/her coding?
Very Soon!!!
$ git clone …..
$ cd /path/to/target/dir/
$ docker-compose up -d
14
How can we version up the middleware? (ex. tomcat, jdk, php, etc.)
15
How can we version up the middleware? (ex. tomcat, jdk, php, etc.)
 Just change public image setting
Base Dockerfile ver 2 Base Dockerfile ver 3
FROM tomcat:8.0-jre8
: "Application directories“ && ¥
mkdir -p /project/public && ¥
mkdir -p /var/log/aaa && ¥
: "Application User“ && ¥
….
FROM tomcat:9.0-jre8
: "Application directories“ && ¥
mkdir -p /project/public && ¥
mkdir -p /var/log/aaa && ¥
: "Application User“ && ¥
….
16
How can we increase the machine spec? (scale up)
17
How can we increase the machine spec? (scale up)
 Edit Variables and Restart
runtime.conf
CPU=0.1
MEM=1024
INSTANCES=1
….
CPU=0.2
MEM=2048
INSTANCES=1
….
18
How can we increase # of machines? (scale out)
19
How can we increase # of machines? (scale out)
 Edit Variables and Restart
runtimi.conf
CPU=0.1
MEM=1024
INSTANCES=1
….
CPU=0.1
MEM=1024
INSTANCES=2
….
20
2. System relation map
21
Application
Image
Base
Image
Base
Image
Snapshot Ver.
Application
Image
Base
Image
Release ver.
DEV env. STG(QA) env. PRO env.
+DEV conf +STG conf +PROD conf
Local env.
+ Local conf
codes
Container management platformDocker-compose
22
git clone
build Base image
push image
git clone
pull Base image
build app image
push image
Trigger
deployment
git clone
pull App image
docker run
Base
Image
confcodes
Base
Dockerfile
Application
Dockerfile
System start!
App
Image
Container management
platform
git
maven
Artifacts Library
Private Docker Registry
23
2. System relation map
24
git clone
build image
extract artifacts
codesDockerfile
git
npm build script
Using -v option (docker mount function)
Generated artifacts are included
in an Application image
25
FROM node:10.5-alpine
LABEL maintainer “hoge <hoge@example.com>"
COPY ./sample-front-dev/package.json /tmp/install/
….
….
COPY ./sample-front-dev/src /tmp/install/src
COPY ./npm-build.sh /tmp/install/
WORKDIR /tmp/install/
RUN set -x && ¥
npm config set https-proxy http://hoge.proxy:9999 && ¥
npm install
CMD ["sh", "/tmp/install/npm-build.sh"]
Dockerfile
#!/bin/sh
npm run build
cp /tmp/install/dist/css/*.css /tmp/artifacts/
cp /tmp/install/dist/js/*.js /tmp/artifacts/
chmod 777 /tmp/artifacts/*
ls -l /tmp/artifacts/
npm-build.sh
26
Swagger Editor (local docker)
Edit & check Preview
openapi.yaml
swaggerapi/swagger-ui
https://hub.docker.com/r/swaggerapi/swagger-ui/
git
Swagger UI
Container management
platform
private
Docker Registry
27
From swaggerapi/swagger-ui
LABEL maintainer “hoge <hoge@sample.com>"
COPY ./spec/openapi.yaml /usr/share/nginx/html/
Dockerfile
{"env": {"SWAGGER_JSON":"openapi.yaml", "API_URL":"http://hoge.sample.intra.com/openapi.yaml"},
"portMappings": [{"containerPort": 0}]}
config
28
git
Container management
platform
private
Docker Registry
Base image
Mock api
soapui-mock-project.xml
SoapUI-x.x.x-linux-bin.tar.gz
entrypoint.sh
29
From java:openjdk-8u111-jre-alpine
LABEL maintainer “hoge <hoge@sample.com>"
COPY SoapUI-5.4.0-linux-bin.tar.gz /opt/
COPY entrypoint.sh /
RUN chmod 755 /entrypoint.sh && ¥
cd /opt/ && ¥
tar -zxf SoapUI-5.4.0-linux-bin.tar.gz && ¥
mv /opt/SoapUI-5.4.0 /opt/soapui && ¥
rm -f SoapUI-5.4.0-linux-bin.tar.gz && ¥
echo "0 1 * * * rm -f /root/*.log" >> /etc/crontabs/root
CMD ["sh", "/entrypoint.sh"]
<base>Dockerfile <application> Dockerfile
From mock-docker-base-sample:1.0
LABEL maintainer “hoge <hoge@sample.com>“
ENV MOCKSERVICE_NAME="mock“ ¥
MOCKSERVICE_PORT="8080“ ¥
PROJECT_FILE="/root/soapui-mock-project.xml"
COPY soapui-mock-project.xml /root/
30
Rakuten Ichiba development Automation show case - Bamboo, Docker -

More Related Content

Similar to Rakuten Ichiba development Automation show case - Bamboo, Docker -

Running MongoDB Enterprise on Kubernetes
Running MongoDB Enterprise on KubernetesRunning MongoDB Enterprise on Kubernetes
Running MongoDB Enterprise on Kubernetes
Ariel Jatib
 
Using Docker For Development
Using Docker For DevelopmentUsing Docker For Development
Using Docker For Development
Laura Frank Tacho
 
How to Dockerize Web Application using Docker Compose
How to Dockerize Web Application using Docker ComposeHow to Dockerize Web Application using Docker Compose
How to Dockerize Web Application using Docker Compose
Evoke Technologies
 
EMC World 2016 - code.09 Introduction to the Docker Platform
EMC World 2016 - code.09 Introduction to the Docker PlatformEMC World 2016 - code.09 Introduction to the Docker Platform
EMC World 2016 - code.09 Introduction to the Docker Platform
{code}
 
OpenStack Murano introduction
OpenStack Murano introductionOpenStack Murano introduction
OpenStack Murano introduction
Victor Zhang
 
DCSF19 Dockerfile Best Practices
DCSF19 Dockerfile Best PracticesDCSF19 Dockerfile Best Practices
DCSF19 Dockerfile Best Practices
Docker, Inc.
 
Docker Distributed application bundle & Stack - Overview
Docker Distributed application bundle & Stack - Overview Docker Distributed application bundle & Stack - Overview
Docker Distributed application bundle & Stack - Overview
Thomas Chacko
 
Docker Azure Friday OSS March 2017 - Developing and deploying Java & Linux on...
Docker Azure Friday OSS March 2017 - Developing and deploying Java & Linux on...Docker Azure Friday OSS March 2017 - Developing and deploying Java & Linux on...
Docker Azure Friday OSS March 2017 - Developing and deploying Java & Linux on...
Patrick Chanezon
 
Docker
DockerDocker
A hitchhiker‘s guide to the cloud native stack
A hitchhiker‘s guide to the cloud native stackA hitchhiker‘s guide to the cloud native stack
A hitchhiker‘s guide to the cloud native stack
QAware GmbH
 
A Hitchhiker’s Guide to the Cloud Native Stack. #CDS17
A Hitchhiker’s Guide to the Cloud Native Stack. #CDS17A Hitchhiker’s Guide to the Cloud Native Stack. #CDS17
A Hitchhiker’s Guide to the Cloud Native Stack. #CDS17
Mario-Leander Reimer
 
ASP.NET Core and Docker
ASP.NET Core and DockerASP.NET Core and Docker
ASP.NET Core and Docker
Chuck Megivern
 
Paris container day june17
Paris container day   june17Paris container day   june17
Paris container day june17
Paris Container Day
 
Using linuxKit to build custom rancherOS systems
Using linuxKit to build custom rancherOS systems Using linuxKit to build custom rancherOS systems
Using linuxKit to build custom rancherOS systems
Moby Project
 
MongoDB.local DC 2018: MongoDB Ops Manager + Kubernetes
MongoDB.local DC 2018: MongoDB Ops Manager + KubernetesMongoDB.local DC 2018: MongoDB Ops Manager + Kubernetes
MongoDB.local DC 2018: MongoDB Ops Manager + Kubernetes
MongoDB
 
Release webinar architecture
Release webinar   architectureRelease webinar   architecture
Release webinar architecture
BigData_Europe
 
Dockerization of Azure Platform
Dockerization of Azure PlatformDockerization of Azure Platform
Dockerization of Azure Platform
nirajrules
 
B14870 solution final
B14870 solution finalB14870 solution final
B14870 solution final
ssuser8f0495
 
Operator SDK for K8s using Go
Operator SDK for K8s using GoOperator SDK for K8s using Go
Operator SDK for K8s using Go
CloudOps2005
 
How to measure everything - a million metrics per second with minimal develop...
How to measure everything - a million metrics per second with minimal develop...How to measure everything - a million metrics per second with minimal develop...
How to measure everything - a million metrics per second with minimal develop...
Jos Boumans
 

Similar to Rakuten Ichiba development Automation show case - Bamboo, Docker - (20)

Running MongoDB Enterprise on Kubernetes
Running MongoDB Enterprise on KubernetesRunning MongoDB Enterprise on Kubernetes
Running MongoDB Enterprise on Kubernetes
 
Using Docker For Development
Using Docker For DevelopmentUsing Docker For Development
Using Docker For Development
 
How to Dockerize Web Application using Docker Compose
How to Dockerize Web Application using Docker ComposeHow to Dockerize Web Application using Docker Compose
How to Dockerize Web Application using Docker Compose
 
EMC World 2016 - code.09 Introduction to the Docker Platform
EMC World 2016 - code.09 Introduction to the Docker PlatformEMC World 2016 - code.09 Introduction to the Docker Platform
EMC World 2016 - code.09 Introduction to the Docker Platform
 
OpenStack Murano introduction
OpenStack Murano introductionOpenStack Murano introduction
OpenStack Murano introduction
 
DCSF19 Dockerfile Best Practices
DCSF19 Dockerfile Best PracticesDCSF19 Dockerfile Best Practices
DCSF19 Dockerfile Best Practices
 
Docker Distributed application bundle & Stack - Overview
Docker Distributed application bundle & Stack - Overview Docker Distributed application bundle & Stack - Overview
Docker Distributed application bundle & Stack - Overview
 
Docker Azure Friday OSS March 2017 - Developing and deploying Java & Linux on...
Docker Azure Friday OSS March 2017 - Developing and deploying Java & Linux on...Docker Azure Friday OSS March 2017 - Developing and deploying Java & Linux on...
Docker Azure Friday OSS March 2017 - Developing and deploying Java & Linux on...
 
Docker
DockerDocker
Docker
 
A hitchhiker‘s guide to the cloud native stack
A hitchhiker‘s guide to the cloud native stackA hitchhiker‘s guide to the cloud native stack
A hitchhiker‘s guide to the cloud native stack
 
A Hitchhiker’s Guide to the Cloud Native Stack. #CDS17
A Hitchhiker’s Guide to the Cloud Native Stack. #CDS17A Hitchhiker’s Guide to the Cloud Native Stack. #CDS17
A Hitchhiker’s Guide to the Cloud Native Stack. #CDS17
 
ASP.NET Core and Docker
ASP.NET Core and DockerASP.NET Core and Docker
ASP.NET Core and Docker
 
Paris container day june17
Paris container day   june17Paris container day   june17
Paris container day june17
 
Using linuxKit to build custom rancherOS systems
Using linuxKit to build custom rancherOS systems Using linuxKit to build custom rancherOS systems
Using linuxKit to build custom rancherOS systems
 
MongoDB.local DC 2018: MongoDB Ops Manager + Kubernetes
MongoDB.local DC 2018: MongoDB Ops Manager + KubernetesMongoDB.local DC 2018: MongoDB Ops Manager + Kubernetes
MongoDB.local DC 2018: MongoDB Ops Manager + Kubernetes
 
Release webinar architecture
Release webinar   architectureRelease webinar   architecture
Release webinar architecture
 
Dockerization of Azure Platform
Dockerization of Azure PlatformDockerization of Azure Platform
Dockerization of Azure Platform
 
B14870 solution final
B14870 solution finalB14870 solution final
B14870 solution final
 
Operator SDK for K8s using Go
Operator SDK for K8s using GoOperator SDK for K8s using Go
Operator SDK for K8s using Go
 
How to measure everything - a million metrics per second with minimal develop...
How to measure everything - a million metrics per second with minimal develop...How to measure everything - a million metrics per second with minimal develop...
How to measure everything - a million metrics per second with minimal develop...
 

More from Rakuten Group, Inc.

コードレビュー改善のためにJenkinsとIntelliJ IDEAのプラグインを自作してみた話
コードレビュー改善のためにJenkinsとIntelliJ IDEAのプラグインを自作してみた話コードレビュー改善のためにJenkinsとIntelliJ IDEAのプラグインを自作してみた話
コードレビュー改善のためにJenkinsとIntelliJ IDEAのプラグインを自作してみた話
Rakuten Group, Inc.
 
楽天における安全な秘匿情報管理への道のり
楽天における安全な秘匿情報管理への道のり楽天における安全な秘匿情報管理への道のり
楽天における安全な秘匿情報管理への道のり
Rakuten Group, Inc.
 
What Makes Software Green?
What Makes Software Green?What Makes Software Green?
What Makes Software Green?
Rakuten Group, Inc.
 
Simple and Effective Knowledge-Driven Query Expansion for QA-Based Product At...
Simple and Effective Knowledge-Driven Query Expansion for QA-Based Product At...Simple and Effective Knowledge-Driven Query Expansion for QA-Based Product At...
Simple and Effective Knowledge-Driven Query Expansion for QA-Based Product At...
Rakuten Group, Inc.
 
DataSkillCultureを浸透させる楽天の取り組み
DataSkillCultureを浸透させる楽天の取り組みDataSkillCultureを浸透させる楽天の取り組み
DataSkillCultureを浸透させる楽天の取り組み
Rakuten Group, Inc.
 
大規模なリアルタイム監視の導入と展開
大規模なリアルタイム監視の導入と展開大規模なリアルタイム監視の導入と展開
大規模なリアルタイム監視の導入と展開
Rakuten Group, Inc.
 
楽天における大規模データベースの運用
楽天における大規模データベースの運用楽天における大規模データベースの運用
楽天における大規模データベースの運用
Rakuten Group, Inc.
 
楽天サービスを支えるネットワークインフラストラクチャー
楽天サービスを支えるネットワークインフラストラクチャー楽天サービスを支えるネットワークインフラストラクチャー
楽天サービスを支えるネットワークインフラストラクチャー
Rakuten Group, Inc.
 
楽天の規模とクラウドプラットフォーム統括部の役割
楽天の規模とクラウドプラットフォーム統括部の役割楽天の規模とクラウドプラットフォーム統括部の役割
楽天の規模とクラウドプラットフォーム統括部の役割
Rakuten Group, Inc.
 
Rakuten Services and Infrastructure Team.pdf
Rakuten Services and Infrastructure Team.pdfRakuten Services and Infrastructure Team.pdf
Rakuten Services and Infrastructure Team.pdf
Rakuten Group, Inc.
 
The Data Platform Administration Handling the 100 PB.pdf
The Data Platform Administration Handling the 100 PB.pdfThe Data Platform Administration Handling the 100 PB.pdf
The Data Platform Administration Handling the 100 PB.pdf
Rakuten Group, Inc.
 
Supporting Internal Customers as Technical Account Managers.pdf
Supporting Internal Customers as Technical Account Managers.pdfSupporting Internal Customers as Technical Account Managers.pdf
Supporting Internal Customers as Technical Account Managers.pdf
Rakuten Group, Inc.
 
Making Cloud Native CI_CD Services.pdf
Making Cloud Native CI_CD Services.pdfMaking Cloud Native CI_CD Services.pdf
Making Cloud Native CI_CD Services.pdf
Rakuten Group, Inc.
 
How We Defined Our Own Cloud.pdf
How We Defined Our Own Cloud.pdfHow We Defined Our Own Cloud.pdf
How We Defined Our Own Cloud.pdf
Rakuten Group, Inc.
 
Travel & Leisure Platform Department's tech info
Travel & Leisure Platform Department's tech infoTravel & Leisure Platform Department's tech info
Travel & Leisure Platform Department's tech info
Rakuten Group, Inc.
 
Travel & Leisure Platform Department's tech info
Travel & Leisure Platform Department's tech infoTravel & Leisure Platform Department's tech info
Travel & Leisure Platform Department's tech info
Rakuten Group, Inc.
 
OWASPTop10_Introduction
OWASPTop10_IntroductionOWASPTop10_Introduction
OWASPTop10_Introduction
Rakuten Group, Inc.
 
Introduction of GORA API Group technology
Introduction of GORA API Group technologyIntroduction of GORA API Group technology
Introduction of GORA API Group technology
Rakuten Group, Inc.
 
100PBを越えるデータプラットフォームの実情
100PBを越えるデータプラットフォームの実情100PBを越えるデータプラットフォームの実情
100PBを越えるデータプラットフォームの実情
Rakuten Group, Inc.
 
社内エンジニアを支えるテクニカルアカウントマネージャー
社内エンジニアを支えるテクニカルアカウントマネージャー社内エンジニアを支えるテクニカルアカウントマネージャー
社内エンジニアを支えるテクニカルアカウントマネージャー
Rakuten Group, Inc.
 

More from Rakuten Group, Inc. (20)

コードレビュー改善のためにJenkinsとIntelliJ IDEAのプラグインを自作してみた話
コードレビュー改善のためにJenkinsとIntelliJ IDEAのプラグインを自作してみた話コードレビュー改善のためにJenkinsとIntelliJ IDEAのプラグインを自作してみた話
コードレビュー改善のためにJenkinsとIntelliJ IDEAのプラグインを自作してみた話
 
楽天における安全な秘匿情報管理への道のり
楽天における安全な秘匿情報管理への道のり楽天における安全な秘匿情報管理への道のり
楽天における安全な秘匿情報管理への道のり
 
What Makes Software Green?
What Makes Software Green?What Makes Software Green?
What Makes Software Green?
 
Simple and Effective Knowledge-Driven Query Expansion for QA-Based Product At...
Simple and Effective Knowledge-Driven Query Expansion for QA-Based Product At...Simple and Effective Knowledge-Driven Query Expansion for QA-Based Product At...
Simple and Effective Knowledge-Driven Query Expansion for QA-Based Product At...
 
DataSkillCultureを浸透させる楽天の取り組み
DataSkillCultureを浸透させる楽天の取り組みDataSkillCultureを浸透させる楽天の取り組み
DataSkillCultureを浸透させる楽天の取り組み
 
大規模なリアルタイム監視の導入と展開
大規模なリアルタイム監視の導入と展開大規模なリアルタイム監視の導入と展開
大規模なリアルタイム監視の導入と展開
 
楽天における大規模データベースの運用
楽天における大規模データベースの運用楽天における大規模データベースの運用
楽天における大規模データベースの運用
 
楽天サービスを支えるネットワークインフラストラクチャー
楽天サービスを支えるネットワークインフラストラクチャー楽天サービスを支えるネットワークインフラストラクチャー
楽天サービスを支えるネットワークインフラストラクチャー
 
楽天の規模とクラウドプラットフォーム統括部の役割
楽天の規模とクラウドプラットフォーム統括部の役割楽天の規模とクラウドプラットフォーム統括部の役割
楽天の規模とクラウドプラットフォーム統括部の役割
 
Rakuten Services and Infrastructure Team.pdf
Rakuten Services and Infrastructure Team.pdfRakuten Services and Infrastructure Team.pdf
Rakuten Services and Infrastructure Team.pdf
 
The Data Platform Administration Handling the 100 PB.pdf
The Data Platform Administration Handling the 100 PB.pdfThe Data Platform Administration Handling the 100 PB.pdf
The Data Platform Administration Handling the 100 PB.pdf
 
Supporting Internal Customers as Technical Account Managers.pdf
Supporting Internal Customers as Technical Account Managers.pdfSupporting Internal Customers as Technical Account Managers.pdf
Supporting Internal Customers as Technical Account Managers.pdf
 
Making Cloud Native CI_CD Services.pdf
Making Cloud Native CI_CD Services.pdfMaking Cloud Native CI_CD Services.pdf
Making Cloud Native CI_CD Services.pdf
 
How We Defined Our Own Cloud.pdf
How We Defined Our Own Cloud.pdfHow We Defined Our Own Cloud.pdf
How We Defined Our Own Cloud.pdf
 
Travel & Leisure Platform Department's tech info
Travel & Leisure Platform Department's tech infoTravel & Leisure Platform Department's tech info
Travel & Leisure Platform Department's tech info
 
Travel & Leisure Platform Department's tech info
Travel & Leisure Platform Department's tech infoTravel & Leisure Platform Department's tech info
Travel & Leisure Platform Department's tech info
 
OWASPTop10_Introduction
OWASPTop10_IntroductionOWASPTop10_Introduction
OWASPTop10_Introduction
 
Introduction of GORA API Group technology
Introduction of GORA API Group technologyIntroduction of GORA API Group technology
Introduction of GORA API Group technology
 
100PBを越えるデータプラットフォームの実情
100PBを越えるデータプラットフォームの実情100PBを越えるデータプラットフォームの実情
100PBを越えるデータプラットフォームの実情
 
社内エンジニアを支えるテクニカルアカウントマネージャー
社内エンジニアを支えるテクニカルアカウントマネージャー社内エンジニアを支えるテクニカルアカウントマネージャー
社内エンジニアを支えるテクニカルアカウントマネージャー
 

Recently uploaded

How to Interpret Trends in the Kalyan Rajdhani Mix Chart.pdf
How to Interpret Trends in the Kalyan Rajdhani Mix Chart.pdfHow to Interpret Trends in the Kalyan Rajdhani Mix Chart.pdf
How to Interpret Trends in the Kalyan Rajdhani Mix Chart.pdf
Chart Kalyan
 
Freshworks Rethinks NoSQL for Rapid Scaling & Cost-Efficiency
Freshworks Rethinks NoSQL for Rapid Scaling & Cost-EfficiencyFreshworks Rethinks NoSQL for Rapid Scaling & Cost-Efficiency
Freshworks Rethinks NoSQL for Rapid Scaling & Cost-Efficiency
ScyllaDB
 
The Microsoft 365 Migration Tutorial For Beginner.pptx
The Microsoft 365 Migration Tutorial For Beginner.pptxThe Microsoft 365 Migration Tutorial For Beginner.pptx
The Microsoft 365 Migration Tutorial For Beginner.pptx
operationspcvita
 
Choosing The Best AWS Service For Your Website + API.pptx
Choosing The Best AWS Service For Your Website + API.pptxChoosing The Best AWS Service For Your Website + API.pptx
Choosing The Best AWS Service For Your Website + API.pptx
Brandon Minnick, MBA
 
zkStudyClub - LatticeFold: A Lattice-based Folding Scheme and its Application...
zkStudyClub - LatticeFold: A Lattice-based Folding Scheme and its Application...zkStudyClub - LatticeFold: A Lattice-based Folding Scheme and its Application...
zkStudyClub - LatticeFold: A Lattice-based Folding Scheme and its Application...
Alex Pruden
 
Crafting Excellence: A Comprehensive Guide to iOS Mobile App Development Serv...
Crafting Excellence: A Comprehensive Guide to iOS Mobile App Development Serv...Crafting Excellence: A Comprehensive Guide to iOS Mobile App Development Serv...
Crafting Excellence: A Comprehensive Guide to iOS Mobile App Development Serv...
Pitangent Analytics & Technology Solutions Pvt. Ltd
 
Apps Break Data
Apps Break DataApps Break Data
Apps Break Data
Ivo Velitchkov
 
"Choosing proper type of scaling", Olena Syrota
"Choosing proper type of scaling", Olena Syrota"Choosing proper type of scaling", Olena Syrota
"Choosing proper type of scaling", Olena Syrota
Fwdays
 
Monitoring and Managing Anomaly Detection on OpenShift.pdf
Monitoring and Managing Anomaly Detection on OpenShift.pdfMonitoring and Managing Anomaly Detection on OpenShift.pdf
Monitoring and Managing Anomaly Detection on OpenShift.pdf
Tosin Akinosho
 
Biomedical Knowledge Graphs for Data Scientists and Bioinformaticians
Biomedical Knowledge Graphs for Data Scientists and BioinformaticiansBiomedical Knowledge Graphs for Data Scientists and Bioinformaticians
Biomedical Knowledge Graphs for Data Scientists and Bioinformaticians
Neo4j
 
Leveraging the Graph for Clinical Trials and Standards
Leveraging the Graph for Clinical Trials and StandardsLeveraging the Graph for Clinical Trials and Standards
Leveraging the Graph for Clinical Trials and Standards
Neo4j
 
PRODUCT LISTING OPTIMIZATION PRESENTATION.pptx
PRODUCT LISTING OPTIMIZATION PRESENTATION.pptxPRODUCT LISTING OPTIMIZATION PRESENTATION.pptx
PRODUCT LISTING OPTIMIZATION PRESENTATION.pptx
christinelarrosa
 
“Temporal Event Neural Networks: A More Efficient Alternative to the Transfor...
“Temporal Event Neural Networks: A More Efficient Alternative to the Transfor...“Temporal Event Neural Networks: A More Efficient Alternative to the Transfor...
“Temporal Event Neural Networks: A More Efficient Alternative to the Transfor...
Edge AI and Vision Alliance
 
JavaLand 2024: Application Development Green Masterplan
JavaLand 2024: Application Development Green MasterplanJavaLand 2024: Application Development Green Masterplan
JavaLand 2024: Application Development Green Masterplan
Miro Wengner
 
Astute Business Solutions | Oracle Cloud Partner |
Astute Business Solutions | Oracle Cloud Partner |Astute Business Solutions | Oracle Cloud Partner |
Astute Business Solutions | Oracle Cloud Partner |
AstuteBusiness
 
[OReilly Superstream] Occupy the Space: A grassroots guide to engineering (an...
[OReilly Superstream] Occupy the Space: A grassroots guide to engineering (an...[OReilly Superstream] Occupy the Space: A grassroots guide to engineering (an...
[OReilly Superstream] Occupy the Space: A grassroots guide to engineering (an...
Jason Yip
 
What is an RPA CoE? Session 1 – CoE Vision
What is an RPA CoE?  Session 1 – CoE VisionWhat is an RPA CoE?  Session 1 – CoE Vision
What is an RPA CoE? Session 1 – CoE Vision
DianaGray10
 
5th LF Energy Power Grid Model Meet-up Slides
5th LF Energy Power Grid Model Meet-up Slides5th LF Energy Power Grid Model Meet-up Slides
5th LF Energy Power Grid Model Meet-up Slides
DanBrown980551
 
Must Know Postgres Extension for DBA and Developer during Migration
Must Know Postgres Extension for DBA and Developer during MigrationMust Know Postgres Extension for DBA and Developer during Migration
Must Know Postgres Extension for DBA and Developer during Migration
Mydbops
 
Taking AI to the Next Level in Manufacturing.pdf
Taking AI to the Next Level in Manufacturing.pdfTaking AI to the Next Level in Manufacturing.pdf
Taking AI to the Next Level in Manufacturing.pdf
ssuserfac0301
 

Recently uploaded (20)

How to Interpret Trends in the Kalyan Rajdhani Mix Chart.pdf
How to Interpret Trends in the Kalyan Rajdhani Mix Chart.pdfHow to Interpret Trends in the Kalyan Rajdhani Mix Chart.pdf
How to Interpret Trends in the Kalyan Rajdhani Mix Chart.pdf
 
Freshworks Rethinks NoSQL for Rapid Scaling & Cost-Efficiency
Freshworks Rethinks NoSQL for Rapid Scaling & Cost-EfficiencyFreshworks Rethinks NoSQL for Rapid Scaling & Cost-Efficiency
Freshworks Rethinks NoSQL for Rapid Scaling & Cost-Efficiency
 
The Microsoft 365 Migration Tutorial For Beginner.pptx
The Microsoft 365 Migration Tutorial For Beginner.pptxThe Microsoft 365 Migration Tutorial For Beginner.pptx
The Microsoft 365 Migration Tutorial For Beginner.pptx
 
Choosing The Best AWS Service For Your Website + API.pptx
Choosing The Best AWS Service For Your Website + API.pptxChoosing The Best AWS Service For Your Website + API.pptx
Choosing The Best AWS Service For Your Website + API.pptx
 
zkStudyClub - LatticeFold: A Lattice-based Folding Scheme and its Application...
zkStudyClub - LatticeFold: A Lattice-based Folding Scheme and its Application...zkStudyClub - LatticeFold: A Lattice-based Folding Scheme and its Application...
zkStudyClub - LatticeFold: A Lattice-based Folding Scheme and its Application...
 
Crafting Excellence: A Comprehensive Guide to iOS Mobile App Development Serv...
Crafting Excellence: A Comprehensive Guide to iOS Mobile App Development Serv...Crafting Excellence: A Comprehensive Guide to iOS Mobile App Development Serv...
Crafting Excellence: A Comprehensive Guide to iOS Mobile App Development Serv...
 
Apps Break Data
Apps Break DataApps Break Data
Apps Break Data
 
"Choosing proper type of scaling", Olena Syrota
"Choosing proper type of scaling", Olena Syrota"Choosing proper type of scaling", Olena Syrota
"Choosing proper type of scaling", Olena Syrota
 
Monitoring and Managing Anomaly Detection on OpenShift.pdf
Monitoring and Managing Anomaly Detection on OpenShift.pdfMonitoring and Managing Anomaly Detection on OpenShift.pdf
Monitoring and Managing Anomaly Detection on OpenShift.pdf
 
Biomedical Knowledge Graphs for Data Scientists and Bioinformaticians
Biomedical Knowledge Graphs for Data Scientists and BioinformaticiansBiomedical Knowledge Graphs for Data Scientists and Bioinformaticians
Biomedical Knowledge Graphs for Data Scientists and Bioinformaticians
 
Leveraging the Graph for Clinical Trials and Standards
Leveraging the Graph for Clinical Trials and StandardsLeveraging the Graph for Clinical Trials and Standards
Leveraging the Graph for Clinical Trials and Standards
 
PRODUCT LISTING OPTIMIZATION PRESENTATION.pptx
PRODUCT LISTING OPTIMIZATION PRESENTATION.pptxPRODUCT LISTING OPTIMIZATION PRESENTATION.pptx
PRODUCT LISTING OPTIMIZATION PRESENTATION.pptx
 
“Temporal Event Neural Networks: A More Efficient Alternative to the Transfor...
“Temporal Event Neural Networks: A More Efficient Alternative to the Transfor...“Temporal Event Neural Networks: A More Efficient Alternative to the Transfor...
“Temporal Event Neural Networks: A More Efficient Alternative to the Transfor...
 
JavaLand 2024: Application Development Green Masterplan
JavaLand 2024: Application Development Green MasterplanJavaLand 2024: Application Development Green Masterplan
JavaLand 2024: Application Development Green Masterplan
 
Astute Business Solutions | Oracle Cloud Partner |
Astute Business Solutions | Oracle Cloud Partner |Astute Business Solutions | Oracle Cloud Partner |
Astute Business Solutions | Oracle Cloud Partner |
 
[OReilly Superstream] Occupy the Space: A grassroots guide to engineering (an...
[OReilly Superstream] Occupy the Space: A grassroots guide to engineering (an...[OReilly Superstream] Occupy the Space: A grassroots guide to engineering (an...
[OReilly Superstream] Occupy the Space: A grassroots guide to engineering (an...
 
What is an RPA CoE? Session 1 – CoE Vision
What is an RPA CoE?  Session 1 – CoE VisionWhat is an RPA CoE?  Session 1 – CoE Vision
What is an RPA CoE? Session 1 – CoE Vision
 
5th LF Energy Power Grid Model Meet-up Slides
5th LF Energy Power Grid Model Meet-up Slides5th LF Energy Power Grid Model Meet-up Slides
5th LF Energy Power Grid Model Meet-up Slides
 
Must Know Postgres Extension for DBA and Developer during Migration
Must Know Postgres Extension for DBA and Developer during MigrationMust Know Postgres Extension for DBA and Developer during Migration
Must Know Postgres Extension for DBA and Developer during Migration
 
Taking AI to the Next Level in Manufacturing.pdf
Taking AI to the Next Level in Manufacturing.pdfTaking AI to the Next Level in Manufacturing.pdf
Taking AI to the Next Level in Manufacturing.pdf
 

Rakuten Ichiba development Automation show case - Bamboo, Docker -

  • 1. Aug, 2018 Takahiro Yamaki EC Marketplace RMS Development Department Rakuten, Inc.
  • 3. 3 Reference: https://blog.netapp.com/blogs/containers-vs-vms/ More info! Docker merit Small size Effective resource sharing High speed spin up … etc.
  • 4. 4 Application Docker Image Base Docker Image • • … • • … • • … Environment variables are attached at booting 1st step 2nd step
  • 5. 5 FROM php/apache:latest : "Application directories“ && ¥ mkdir -p /project/public && ¥ : "Application User“ && ¥ groupadd -g 10000 hoge && ¥ useradd -u 10001 -g hoge -s /bin/bash hogeuser && ¥ : "Owner change" && ¥ chown -R hogeuser:hoge /project/public COPY ./init.sh /opt/docker/provision/entrypoint.d/ ENV WEB_DOCUMENT_ROOT /project/public $ sudo docker build –t hoge-application-base:1.0 . Infrastructure as code !!! Public images
  • 6. 6Reference: https://hub.docker.com/ You don’t need to make these servers from scratch anymore!
  • 7. 7 FROM hoge-application-base:1.0 COPY ./sample-app/public /project/public/ $ sudo docker build -t hoge-application:1.0 . Application release steps as code
  • 9. 9 Application Image Base Image Base Image Snapshot Ver. Application Image Base Image Release ver. DEV env. STG(QA) env. PRO env. +DEV conf +STG conf +PROD conf Local env. + Local conf codes Container management platformDocker-compose Quality assured docker image will be deployed to PROD env after QA test. Differences are only config files
  • 10. 10 Is it necessary to maintain your server construction manual?
  • 11. 11 Is it necessary to maintain your server construction manual?  No!!! Infrastructure as code!!! FROM tomcat:8.0-jre8 : "Application directories“ && ¥ mkdir -p /project/public && ¥ : "Application User“ && ¥ …. Base Dockerfile ver 1 Base Dockerfile ver 2 FROM tomcat:8.0-jre8 : "Application directories“ && ¥ mkdir -p /project/public && ¥ mkdir -p /var/log/aaa && ¥ : "Application User“ && ¥ ….
  • 12. 12 How long is it likely take for a new joiner to start his/her coding?
  • 13. 13 How long is it likely take for a new joiner to start his/her coding? Very Soon!!! $ git clone ….. $ cd /path/to/target/dir/ $ docker-compose up -d
  • 14. 14 How can we version up the middleware? (ex. tomcat, jdk, php, etc.)
  • 15. 15 How can we version up the middleware? (ex. tomcat, jdk, php, etc.)  Just change public image setting Base Dockerfile ver 2 Base Dockerfile ver 3 FROM tomcat:8.0-jre8 : "Application directories“ && ¥ mkdir -p /project/public && ¥ mkdir -p /var/log/aaa && ¥ : "Application User“ && ¥ …. FROM tomcat:9.0-jre8 : "Application directories“ && ¥ mkdir -p /project/public && ¥ mkdir -p /var/log/aaa && ¥ : "Application User“ && ¥ ….
  • 16. 16 How can we increase the machine spec? (scale up)
  • 17. 17 How can we increase the machine spec? (scale up)  Edit Variables and Restart runtime.conf CPU=0.1 MEM=1024 INSTANCES=1 …. CPU=0.2 MEM=2048 INSTANCES=1 ….
  • 18. 18 How can we increase # of machines? (scale out)
  • 19. 19 How can we increase # of machines? (scale out)  Edit Variables and Restart runtimi.conf CPU=0.1 MEM=1024 INSTANCES=1 …. CPU=0.1 MEM=1024 INSTANCES=2 ….
  • 21. 21 Application Image Base Image Base Image Snapshot Ver. Application Image Base Image Release ver. DEV env. STG(QA) env. PRO env. +DEV conf +STG conf +PROD conf Local env. + Local conf codes Container management platformDocker-compose
  • 22. 22 git clone build Base image push image git clone pull Base image build app image push image Trigger deployment git clone pull App image docker run Base Image confcodes Base Dockerfile Application Dockerfile System start! App Image Container management platform git maven Artifacts Library Private Docker Registry
  • 24. 24 git clone build image extract artifacts codesDockerfile git npm build script Using -v option (docker mount function) Generated artifacts are included in an Application image
  • 25. 25 FROM node:10.5-alpine LABEL maintainer “hoge <hoge@example.com>" COPY ./sample-front-dev/package.json /tmp/install/ …. …. COPY ./sample-front-dev/src /tmp/install/src COPY ./npm-build.sh /tmp/install/ WORKDIR /tmp/install/ RUN set -x && ¥ npm config set https-proxy http://hoge.proxy:9999 && ¥ npm install CMD ["sh", "/tmp/install/npm-build.sh"] Dockerfile #!/bin/sh npm run build cp /tmp/install/dist/css/*.css /tmp/artifacts/ cp /tmp/install/dist/js/*.js /tmp/artifacts/ chmod 777 /tmp/artifacts/* ls -l /tmp/artifacts/ npm-build.sh
  • 26. 26 Swagger Editor (local docker) Edit & check Preview openapi.yaml swaggerapi/swagger-ui https://hub.docker.com/r/swaggerapi/swagger-ui/ git Swagger UI Container management platform private Docker Registry
  • 27. 27 From swaggerapi/swagger-ui LABEL maintainer “hoge <hoge@sample.com>" COPY ./spec/openapi.yaml /usr/share/nginx/html/ Dockerfile {"env": {"SWAGGER_JSON":"openapi.yaml", "API_URL":"http://hoge.sample.intra.com/openapi.yaml"}, "portMappings": [{"containerPort": 0}]} config
  • 28. 28 git Container management platform private Docker Registry Base image Mock api soapui-mock-project.xml SoapUI-x.x.x-linux-bin.tar.gz entrypoint.sh
  • 29. 29 From java:openjdk-8u111-jre-alpine LABEL maintainer “hoge <hoge@sample.com>" COPY SoapUI-5.4.0-linux-bin.tar.gz /opt/ COPY entrypoint.sh / RUN chmod 755 /entrypoint.sh && ¥ cd /opt/ && ¥ tar -zxf SoapUI-5.4.0-linux-bin.tar.gz && ¥ mv /opt/SoapUI-5.4.0 /opt/soapui && ¥ rm -f SoapUI-5.4.0-linux-bin.tar.gz && ¥ echo "0 1 * * * rm -f /root/*.log" >> /etc/crontabs/root CMD ["sh", "/entrypoint.sh"] <base>Dockerfile <application> Dockerfile From mock-docker-base-sample:1.0 LABEL maintainer “hoge <hoge@sample.com>“ ENV MOCKSERVICE_NAME="mock“ ¥ MOCKSERVICE_PORT="8080“ ¥ PROJECT_FILE="/root/soapui-mock-project.xml" COPY soapui-mock-project.xml /root/
  • 30. 30