To provide a GitLab bundle with CI/CD pipeline as code setup which executes CI/CD pipeline build steps in Docker containers. Dependent Eiffel services will be loaded from the Eiffel bundle to provide capability to log/visualize pipeline activities via Eiffel events.
CI:
- 2 Java Microservices to be imported (ms-frontend & ms-backend) with .gitlab-ci.yml files
- GitLab CI engine with pipeline as code (ms-frontend & ms-backend)
- Pre & post-merge pipelines
- Eiffel event generated
CD:
- CD Pipelines with kubectl deployment via HELM templates, helm charts included in ms-frontend & ms-backend microservices
- Pre-merge CD pipeline (merge request) deployment to dev
- Post-merge CD pipeline (merge request) deployment to stage
- Deployment to production is triggered via manually decision in GiLab GUI
- Immutable Docker Images are used together with microservices config injection to configure microservices in the different K8S target environments
The following name is used to refer to this bundle in the easy2use CLI:
GitLab
Eiffel bundle components
The Easy2Use GitLab bundle is only applicable for deployments in Kubernetes.
OS | Minimum Requirements | Preferably | Comments |
---|---|---|---|
Windows 'Docker Toolbox' | ? | 24 GB RAM 50 GB Disk? |
This recommendation is valid when assigning 4 CPU cores to the Docker machine. With less cores less memory would be consumed, but the performance will be worse. The assigned amount of RAM will be allocated to the Docker machine until it is stopped |
Windows 'Docker for Windows' | ? | 20 GB RAM? 50 GB Disk? |
The assigned amount of RAM is dynamically allocated and only used by the Docker machine when needed? |
Linux | 8 GB RAM | 16 GB RAM or more | ~11 GB of RAM will be use under the load. When all containers is loaded, the memory usage is ~6 GB RAM. Computer with 8 GB RAM works, but it will takes some more time to load all containers due to swapping data between memory and hard drive. |
- Docker 18.06 CE or newer
- Docker-Compose 1.22 or newer
- Kubernetes cluster (local or remote)
- Kubectl
- Helm
If running in local K8S cluster, minikube or docker-for-windows (windows 10 Hyper-v). Local K8S cluster configuration is required.
- Local K8S cluster (windows 10 Hyper-v) do:
./easy2use configure-local-k8s-hyper-v GitLab -t Kubernetes
- Local K8S cluster (minikube) do:
./easy2use configure-local-k8s-minikube GitLab -t Kubernetes
A detailed view can be found here.
Gitlab can only be deployed once per cluster (one ingress used). The GitLab startup can take a few minutes, so be patient!
Deploy GitLab bundle with all components including Argo:
./easy2use start GitLab -t Kubernetes -n <namespace> -d <basedomainname>
basedomain name is the basedomainname for the K8S cluster, if using local k8s kluster use ex. mylocalkube.com
NOTE: You need to answer "Y" twice, first for the GitLab bundle installs and then the dependent services from the Eiffel bundle!
Easy2Use list command will both list URLs (ingresses) to the deployed K8S services and username/password for the services.
./easy2use list GitLab -t Kubernetes -n <namespace>
NOTE: For included Eiffel components do:
./easy2use list Eiffel -t Kubernetes -n <namespace>
If running the GitLab bundle on a local K8S cluster, you need to update your ..etc/hosts file with ingresses. To print the ingresses to use do:
- Local K8S cluster (windows 10 Hyper-v) do:
./easy2use generate-local-hosts-file-hyper-v GitLab -t Kubernetes
- Local K8S cluster (minikube) do:
./easy2use generate-local-hosts-file-minikube GitLab -t Kubernetes
Update your hosts file with the output from the printout!
- Linux: /etc/hosts
- Windows: C:\Windows\System32\drivers\etc\hosts (OBS you need to open cmd in Administrator mode!)
The deployed applications ms-frontend & ms-backend (GitLab CD pipelines) will not be removed via Easy2Use CLI.
./easy2use remove GitLab -t Kubernetes -n <namespace>
NOTE: You need to answer "Y" twice, first for the GitLab bundle removals and then the dependent services from the Eiffel bundle!
When the bundle is started it is time to start playing around with the services. A step by step tutorial can be found here.