- person Penulis:
-
Dimas Maryanto
PT. Tabeldata Informatika
- account_balance_wallet Donasi via:
- Saweria a/n Dimas Maryanto
- lock_open Join Premium Members:
- Udemy.com
-
Daftar Materi
-
1. Pengenalan Docker 8
-
2. Docker Registry 3
-
3. Docker Container CLI 8
-
1. Docker CLI (Command Line Interface)
2. Management Docker Container
3. Management Docker Images
4. Run a command in a running container
5. Expose services to outside using ports
6. Copying files/content between container and filesystem
7. Logging, Inspect, & Resource Usage Statistics Containers
8. Run a Container using Environtment File
-
4. Docker Networks 7
-
5. Docker Volumes 5
-
6. Dockerfile 15
-
1. Build Docker Image Overview
2. Usage docker build
3. FROM Instruction
4. Environtment Replacement
5. Copying Resources
6. Excluding files/directories
7. Label Instruction
8. Execution Instruction
9. CMD vs ENTRYPOINT?
10. Exposing Ports
11. User, Volumes and Working Directory
12. Health Check Instruction
13. Multiple Stage Builds
14. Best practices for writing Dockerfiles
15. Best practices for scanning images
-
7. Study Kasus: Build docker image 14
-
1. Build specific docker image by programming languages
2. Build Docker Image for Java Webapp
3. Build Java Web using maven-docker-plugin
4. Build docker image for spring-boot
5. Springboot - using Environtment
6. Springboot - where data such as files/images we stored?
7. Springboot - Using Database
8. Build docker image for Angular Project
9. Angular - Access Rest API
10. Angular - Proxy to backend
11. Build docker image for PHP
12. Build Docker image for Laravel Framework
13. Laravel - Using Frontend & Rest API
14. Laravel - Using Database
-
8. Docker Compose 19
-
1. Overview of Docker Compose
2. Get started with Docker Compose
3. Overview of docker-compose CLI
4. Compose file specification and syntax
5. Environment variables in Compose
6. Volume in Compose
7. Share data between Containers in Compose
8. Using sshfs for share data in Compose
9. Using NFS for share data in Compose
10. Networking Overview in Compose file
11. Network links in Compose file
12. Specify custom networks in Compose file
13. Dependency between services in Compose file
14. Build docker image using Compose file
15. Using profiles with Compose file
16. Multiple Compose files to Add & Override attribute
17. Example use case of multiple compose files
18. Scale services using compose command
19. Use Compose in production
-
9. Study Kasus: Docker Compose 7
-
10. Docker Context 8
-
11. Study Kasus: Docker for CI 8
-
1. Overview of Study Cases using docker for CI
2. Setup environment for CI using Gitlab & Nexus OSS
3. The `.gitlab-ci.yml` file
4. Pipeline: PHP deployment using Gitlab CI
5. Pipeline: Java Web deployment using Gitlab CI
6. Pipeline: spring-boot deploy with Gitlab CI
7. Pipeline: Angular deploy with Gitlab CI
8. Pipeline: Laravel deploy with Gitlab CI
-
12. Docker Machine 7
-
13. Study Kasus: Ansible for Docker 4
-
14. Docker Swarm
- Materi: belum tersedia...
-
15. Study Kasus: Docker Swarm
- Materi: belum tersedia...
-
16. Docker on Cloud using GCP
- Materi: belum tersedia...
- Lastest Posts
- 09 Apr 23 Working with Deployment object
- 26 Feb 23 Study cases: Microservice apps (...
- 05 Feb 23 Welcome to the Nutanix HCF (Hybr...
- 04 Feb 23 Silabus SRE - Nutanix AHV: Pemul...
- 17 Jan 23 What is Workload Resources?
- 17 Jan 23 Overview Kubernetes Workloads re...
- 15 Jan 23 Getting started with Transaction...
- 14 Jan 23 Overview of Concurrency Control
- 14 Jan 23 Time your practice (part 3)
- 08 Jan 23 Cleanup Data from Table
Pipeline: Java Web deployment using Gitlab CI
Hai semuanya, di materi study kasus kali ini kita akan membahas Build pipeline untuk Java Web menggunakan Gitlab CI, source-code yang kita gunakan berdasarkan study kasus sebelumnya yaitu seperti berikut:
Pipeline yang kita buat diantaranya:
- Build docker image using
maven-dockerfile-plugin
- Push to docker registry
- Add proxy / local caching from maven registry using Nexus OSS
Ok langusung aja kita buat file .gitlab-ci.yml
seperti berikut:
Setelah itu, kita buat repository baru di Gitlab dan kemudian push source-code kita ke sana. maka hasilnya seperti berikut:
Sebelum kita deploy, kita buat variable dulu di CI/CD di level Project / Group
name: M2_PROXY
,
type: file
,
protected: no
value:
<?xml version="1.0" encoding="UTF-8"?>
<settings>
<servers>
<server>
<id>192.168.88.9:8086</id>
<username>admin</username>
<password>default_password</password>
</server>
<server>
<id>192.168.88.9:8087</id>
<username>admin</username>
<password>default_password</password>
</server>
</servers>
</settings>
Seperti berikut:
Kemudian, kita buat git tag
bisa melalui command line atau pun gitlab seperti berikut:
Jika dijalankan maka hasilnya seperti berikut:
➜ docker git:(main) git tag -a 2021.11.27.17.23-release -m "first build javaweb using gitlab ci"
➜ docker git:(main) git push -u demo main --tags
info: detecting host provider for 'http://192.168.88.10/'...
Enumerating objects: 48, done.
Counting objects: 100% (48/48), done.
Delta compression using up to 16 threads
Compressing objects: 100% (34/34), done.
Writing objects: 100% (45/45), 6.79 KiB | 3.39 MiB/s, done.
Total 45 (delta 15), reused 23 (delta 7), pack-reused 0
To http://192.168.88.10/root/udemy-javaweb.git
* [new tag] 2021.11.27.17.23-release -> 2021.11.27.17.23-release
Branch 'main' set up to track remote branch 'main' from 'demo'.
Pada pipeline di tersebut agak sedikit berbeda dengan sebelum-sebelumnya. Jadi disini kita menggunakan docker image maven:maven:3.6.3-jdk-11
untuk melakukan build docker image dan service docker:18.09-dind
Nah sekarang kita bisa check pada pipeline, jika sukses maka hasilnya seperti berikut:
Add caching from maven registry using Nexus OSS
Selanjutnya kita akan bahas untuk mempercepat proses build di maven, jika temen-temen perhatikan dalam hasil build sebelumnya membutuhkan waktu lebih dari 5 menit dalam mendownload dependency dan plugin dari maven repository. Kita sudah menggunakan local caching gitlab tpi akan lebih cepet lagi menggunakan proxy repository maven dengan bantuan Nexus OSS.
Ok langusung ja, update configurasi variable untuk M2_PROXY
seperti berikut:
Sekarang kita coba build ulang, dengan klik button retry kita liat first run seperti berikut:
Sekarang kita coba lagi untuk second run, semoga terlihat perbedaannya seperti berikut hasilnya:
Nah sekarang terlihat ya perbedaanya dari 1 menit lebih
ke 5 detik
build timenya.
Yuk simak juga videonya,
Dan jika temen-temen belajar hal baru kali ini jangan lupa buat Like, Subcribe, dan Share ke temen kalian. Terimakasih!!!
-
Referensi
https://docs.docker.com/