Professional Documents
Culture Documents
Session_01_Deployment Architecture + Jenkins + Setting Up Schedulers
Session_01_Deployment Architecture + Jenkins + Setting Up Schedulers
Schedulers
COMET, Genprio, & XL Center
1
Key Points
• Deployment Architecture
• CICD Overview
• Schedulers
2
Deployment
Architecture
3
Deployment Architecture
(Development to Production)
Microservice Check code coverage and Integration and developer Creating merge requests
development in feature dependency testing in relevant SIT for the relevant staging
branches vulnerabilities environments branches
Deployment to QA Environment
Merge QA branch to
Successful Jenkins Deploying into
master branch and tag the
pipeline process Production environment
master branch
5
Deployment Architecture
(Genprio application deployed clusters)
6
Deployment Architecture
(XL Center application deployed clusters)
7
02
CICD Pipelines
8
CICD Overview
(CICD Pipeline related technologies)
GitLab
CI CD
Jenkins
9
CICD (Continuous Integration)
COMET Dev/SIT Force pushing into ‘SIT’ branch will trigger the deployment
11
CICD
(Genprio Environment triggers)
Genprio
12
CICD
(XL Center Environment triggers)
Using ‘Build with parameters’ option in Jenkins will trigger the deployment.
XL Center SIT
(Changes should be force pushed into ‘sit’ branch or merged into ‘sit’ branch)
Using ‘Build with parameters’ option in Jenkins will trigger the deployment. (Changes
Staging
should be merged into ‘sit’ branch)
13
CICD
(XL Center Pipeline manual build)
14
CICD (XL Center Pipeline URLs)
• xl center frontend
non prod-
https://platform.xlaxiata.id/job/XLCenterOnline/job/xlcenteronline-frontend/job/nonprod/job/xlcenteronli
ne-frontend/
prod -
https://platform.xlaxiata.id/job/XLCenterOnline/job/xlcenteronline-frontend/job/prod/job/xlcenteronline-f
rontend/
16
Creating new MS with new pipelines Contd
4. Define Docker file inside the resources folder specified for each environment.
17
Creating new MS with new pipelines Contd
5. Define Jenkins file in the root folder to trigger the CICD pipeline.
• Includes IPs and DNS of 3rd party systems consumed by the service.
7. Define the cluster config file in the environment resources folder to define configurations
mapped to the required cluster.
19
Creating Jenkins pipelines for the new MS
1. Create new pipeline by clicking on 'New Item' -> Pipeline.
2. Go to configuration and update the git URL and required details.
3. Copy the Jenkins URL and secret key generated to use in the Git repository. 20
Defining Jenkins pipelines for the new MS
1. Go to Settings -> Webhooks
21
2. Go to 'Add new webhook'
22
3. Add the URL and Secret token generated during Jenkins pipeline creation.
4. Add the trigger action defined for the CICD pipeline build. (push/merge/tag etc)
23
5. Click on 'Add webhook'
03
Kubernetes
Configurations
24
Kubernetes Clusters
(Production Clusters)
25
Kubernetes Clusters
(Non-Production Clusters)
26
Connecting to a cluster
• Click on 'Actions' -> Connect
28
Basic Kubernetes Commands
• Check all the namespaces in the relevant cluster
o kubectl get ns
• Describe pod( to check the pod status when pod is getting up)
okubectl describe po PodName -n namespace
• Check inside a pod( to check the requests directly through the pod)
okubectl exec -it PodName -sh -n namespace
30
04
Schedulers
31
Monitor Applied Schedulers
(production environment)
32
View Single Scheduler Details
(production environment)
33
Create New Scheduler
Create the yaml file with necessary settings
NOTE!
Scheduler time: This can be created
manually or use a third-party tool like
crontab.guru. Time should be
calculated related to the server time
34
Apply New Scheduler
(production environment)
Log in to the GCP Console and connect to the Execute ‘vim <cronjob_yaml_name.yaml>’ to create a new yaml file
‘monitoring-vm’ and go to the root by executing ‘sudo in the cronjobs directory
su –’ command, then go to the cronjobs directory using
‘cd cronjobs’ cronjob_yaml_name: Use a unique name for the cronjob
Press ‘i’ to enter the insert mode and copy the cronjob
Execute ‘kubectl apply –f <cronjob_yaml_name.yaml> –n configurations
<namespace>’ to apply the cronjob and start Press ‘Esc’ to exit from insert mode
Execute ‘:wq!’ to save and exit the yaml file
35
Edit an Existing Scheduler
(production environment)
36
Edit an Existing Scheduler
(production environment)
37
Activity
(development environment)
Write a scheduler to run every 2 minutes and call below API "API“.
Scheduler name: training-scheduler-{your_name}
yaml File Name: training-scheduler-{your_name}.yaml
Apply the scheduler in development environment. Check the logs and catch
the scheduler execution log and confirm the execution
38
Thank you!
Innovation start’s with a conversation. Let’s talk!
info@axiatadigitallabs.com
www.axiatadigitallabs.com
39