CI/CD & DevOps
Git repository၊ CI/CD pipelines နှင့် project management တို့ပါဝင်သော ပြီးပြည့်စုံသော DevOps platform
source control၊ CI/CD၊ လုံခြုံရေး၊ monitoring နှင့် အခြားအရာများကို application တစ်ခုတည်းတွင်
unlimited parallel job များ၊ Docker ပံ့ပိုးမှုနှင့် Kubernetes ပေါင်းစပ်မှုပါသော အစွမ်းထက် pipeline များ
pipeline တိုင်းတွင် အလိုအလျောက် လုံခြုံရေးစကင် (SAST၊ DAST၊ dependency၊ container)
built-in Docker မှတ်ပုံတင်ခန်း နှင့် multi-format ပက်ကေ့ချ် ဂိုဒေါင် (npm၊ Maven၊ PyPI စသည်ဖြင့်)
auto review app၊ canary deploy နှင့် monitoring ပါသော Native K8s ပေါင်းစပ်မှု
သင့် infrastructure ပေါ်တွင် deploy လုပ်ပါ သို့မဟုတ် GitLab.com SaaS ကို အသုံးပြုပါ၊ နည်းလမ်းနှစ်ခုလုံးတွင် အင်္ဂါရပ်တူညီသည်
sudo apt update
sudo apt install -y curl openssh-server ca-certificates tzdata perl2. Postfix ကို တပ်ဆင်ခြင်း (email notification အတွက်):sudo apt install -y postfix
# Select "Internet Site" and configure your domain3. GitLab Package Repository ကို ထည့်ခြင်း:curl https://packages.gitlab.com/install/repositories/gitlab/gitlab-ce/script.deb.sh | sudo bash4. GitLab (Community Edition) ကို တပ်ဆင်ခြင်း:# Set your domain (or IP)
export EXTERNAL_URL="https://gitlab.yourdomain.com"
# Install GitLab CE
sudo EXTERNAL_URL=$EXTERNAL_URL apt install gitlab-ce
# Check installation status
sudo gitlab-ctl status5. ကနဦး Root Password ကို ရယူခြင်း:# Password is auto-generated and stored here
sudo cat /etc/gitlab/initial_root_password
# Login as: root / <password>
# Change password immediately after first login6. GitLab ကို configure လုပ်ခြင်း:sudo nano /etc/gitlab/gitlab.rb
# Essential settings:
external_url 'https://gitlab.yourdomain.com'
gitlab_rails['gitlab_shell_ssh_port'] = 22
gitlab_rails['time_zone'] = 'UTC'
# Email settings
gitlab_rails['smtp_enable'] = true
gitlab_rails['smtp_address'] = "smtp.gmail.com"
gitlab_rails['smtp_port'] = 587
gitlab_rails['smtp_user_name'] = "your-email@gmail.com"
gitlab_rails['smtp_password'] = "your-app-password"
gitlab_rails['smtp_domain'] = "gmail.com"
gitlab_rails['smtp_authentication'] = "login"
gitlab_rails['smtp_enable_starttls_auto'] = true
gitlab_rails['gitlab_email_from'] = 'gitlab@yourdomain.com'
# Reconfigure after changes
sudo gitlab-ctl reconfigure7. GitLab Runner ကို တပ်ဆင်ခြင်း:# Add GitLab Runner repository
curl -L "https://packages.gitlab.com/install/repositories/runner/gitlab-runner/script.deb.sh" | sudo bash
# Install
sudo apt install gitlab-runner
# Check status
sudo gitlab-runner status8. GitLab Runner ကို register လုပ်ခြင်း:# Get registration token from:
# GitLab UI → Admin → CI/CD → Runners
sudo gitlab-runner register \
--url https://gitlab.yourdomain.com \
--registration-token YOUR_TOKEN \
--executor docker \
--docker-image docker:20.10 \
--docker-privileged \
--docker-volumes /var/run/docker.sock:/var/run/docker.sock9. Let's Encrypt SSL ကို ဖွင့်ခြင်း:sudo nano /etc/gitlab/gitlab.rb
# Add:
letsencrypt['enable'] = true
letsencrypt['contact_emails'] = ['admin@yourdomain.com']
external_url 'https://gitlab.yourdomain.com'
# Apply
sudo gitlab-ctl reconfigure10. GitLab ကို ဝင်ရောက်ခြင်း:stages:
- build
- test
- deploy
variables:
DOCKER_IMAGE: myapp:$CI_COMMIT_SHORT_SHA
build:
stage: build
image: docker:20.10
services:
- docker:20.10-dind
script:
- docker build -t $DOCKER_IMAGE .
- docker push $DOCKER_IMAGE
only:
- main
test:
stage: test
image: node:18
script:
- npm install
- npm test
coverage: '/Coverage: \d+\.\d+%/'
deploy_production:
stage: deploy
image: bitnami/kubectl:latest
script:
- kubectl set image deployment/myapp myapp=$DOCKER_IMAGE
environment:
name: production
url: https://app.yourdomain.com
only:
- main
when: manual2. Docker-in-Docker ဖွဲ့စည်းမှု:services:
- docker:20.10-dind
variables:
DOCKER_TLS_CERTDIR: "/certs"
DOCKER_HOST: tcp://docker:2376
DOCKER_TLS_VERIFY: 1
DOCKER_CERT_PATH: "$DOCKER_TLS_CERTDIR/client"3. Kubernetes ဖြန့်ကျက်ခြင်း:deploy:
image: bitnami/kubectl:latest
script:
- kubectl config set-cluster k8s --server="$KUBE_URL" --insecure-skip-tls-verify=true
- kubectl config set-credentials admin --token="$KUBE_TOKEN"
- kubectl config set-context default --cluster=k8s --user=admin
- kubectl config use-context default
- kubectl apply -f k8s/deployment.yml
- kubectl rollout status deployment/myapp4. လုံခြုံရေး စကင်န်ဖတ်ခြင်း:include:
- template: Security/SAST.gitlab-ci.yml
- template: Security/Dependency-Scanning.gitlab-ci.yml
- template: Security/Container-Scanning.gitlab-ci.ymlအကောင်းဆုံးလေ့ကျင့်မှုများ:ကျွန်တော်တို့ရဲ့ရိုးရှင်းတဲ့ VPS ဖြန့်ချိလုပ်ငန်းစဉ်နှင့်အတူမိနစ်အနည်းငယ်အတွင်းစတင်
Deploy in about 2 minutes • Full root access • Support by ticket and email