Auto DevOps | GitLab - 0 views
-
Auto DevOps provides pre-defined CI/CD configuration which allows you to automatically detect, build, test, deploy, and monitor your applications
- ...78 more annotations...
-
Once set up, all requests will hit the load balancer, which in turn will route them to the Kubernetes pods that run your application(s).
-
need to define a separate KUBE_INGRESS_BASE_DOMAIN variable for all the above based on the environment.
-
Continuous deployment to production: Enables Auto Deploy with master branch directly deployed to production.
-
If a project’s repository contains a Dockerfile, Auto Build will use docker build to create a Docker image.
-
Each buildpack requires certain files to be in your project’s repository for Auto Build to successfully build your application.
-
Auto Test automatically runs the appropriate tests for your application using Herokuish and Heroku buildpacks by analyzing your project to detect the language and framework.
-
Auto Code Quality uses the Code Quality image to run static analysis and other code checks on the current code.
-
Static Application Security Testing (SAST) uses the SAST Docker image to run static analysis on the current code and checks for potential security issues.
-
Dependency Scanning uses the Dependency Scanning Docker image to run analysis on the project dependencies and checks for potential security issues.
-
License Management uses the License Management Docker image to search the project dependencies for their license.
-
Vulnerability Static Analysis for containers uses Clair to run static analysis on a Docker image and checks for potential security issues.
-
Review Apps are temporary application environments based on the branch’s code so developers, designers, QA, product managers, and other reviewers can actually see and interact with code changes as part of the review process. Auto Review Apps create a Review App for each branch. Auto Review Apps will deploy your app to your Kubernetes cluster only. When no cluster is available, no deployment will occur.
-
The Review App will have a unique URL based on the project ID, the branch or tag name, and a unique number, combined with the Auto DevOps base domain.
-
Dynamic Application Security Testing (DAST) uses the popular open source tool OWASP ZAProxy to perform an analysis on the current code and checks for potential security issues.
-
Auto Browser Performance Testing utilizes the Sitespeed.io container to measure the performance of a web page.
-
After a branch or merge request is merged into the project’s default branch (usually master), Auto Deploy deploys the application to a production environment in the Kubernetes cluster, with a namespace based on the project name and unique project ID
-
Auto Deploy doesn’t include deployments to staging or canary by default, but the Auto DevOps template contains job definitions for these tasks if you want to enable them.
-
For internal and private projects a GitLab Deploy Token will be automatically created, when Auto DevOps is enabled and the Auto DevOps settings are saved.
-
If the GitLab Deploy Token cannot be found, CI_REGISTRY_PASSWORD is used. Note that CI_REGISTRY_PASSWORD is only valid during deployment.
-
If present, DB_INITIALIZE will be run as a shell command within an application pod as a helm post-install hook.
-
a post-install hook means that if any deploy succeeds, DB_INITIALIZE will not be processed thereafter.
-
-
-
Once your application is deployed, Auto Monitoring makes it possible to monitor your application’s server and response metrics right out of the box.
-
annotate the NGINX Ingress deployment to be scraped by Prometheus using prometheus.io/scrape: "true" and prometheus.io/port: "10254"
-
If you are also using Auto Review Apps and Auto Deploy and choose to provide your own Dockerfile, make sure you expose your application to port 5000 as this is the port assumed by the default Helm chart.
-
While Auto DevOps provides great defaults to get you started, you can customize almost everything to fit your needs; from custom buildpacks, to Dockerfiles, Helm charts, or even copying the complete CI/CD configuration into your project to enable staging and canary deployments, and more.
-
If your project has a Dockerfile in the root of the project repo, Auto DevOps will build a Docker image based on the Dockerfile rather than using buildpacks.
-
Bundled chart - If your project has a ./chart directory with a Chart.yaml file in it, Auto DevOps will detect the chart and use it instead of the default one.
-
Create a project variable AUTO_DEVOPS_CHART with the URL of a custom chart to use or create two project variables AUTO_DEVOPS_CHART_REPOSITORY with the URL of a custom chart repository and AUTO_DEVOPS_CHART with the path to the chart.
-
make use of the HELM_UPGRADE_EXTRA_ARGS environment variable to override the default values in the values.yaml file in the default Helm chart.
-
specify the use of a custom Helm chart per environment by scoping the environment variable to the desired environment.
-
-
Your additions will be merged with the Auto DevOps template using the behaviour described for include
-
Set up the replica variables using a project variable and scale your application by just redeploying it!
-
Auto DevOps detects variables where the key starts with K8S_SECRET_ and make these prefixed variables available to the deployed application, as environment variables.
-
if you update an application secret without changing any code then manually create a new pipeline, you will find that any running application pods will not have the updated secrets.
-
The normal behavior of Auto DevOps is to use Continuous Deployment, pushing automatically to the production environment every time a new pipeline is run on the default branch.
-
If STAGING_ENABLED is defined in your project (e.g., set STAGING_ENABLED to 1 as a CI/CD variable), then the application will be automatically deployed to a staging environment, and a production_manual job will be created for you when you’re ready to manually deploy to production.
-
If CANARY_ENABLED is defined in your project (e.g., set CANARY_ENABLED to 1 as a CI/CD variable) then two manual jobs will be created: canary which will deploy the application to the canary environment production_manual which is to be used by you when you’re ready to manually deploy to production.
-
If INCREMENTAL_ROLLOUT_MODE is set to manual in your project, then instead of the standard production job, 4 different manual jobs will be created: rollout 10% rollout 25% rollout 50% rollout 100%
-
The percentage is based on the REPLICAS variable and defines the number of pods you want to have for your deployment.
-
Once you get to 100%, you cannot scale down, and you’d have to roll back by redeploying the old version using the rollback button in the environment page.
-
When a project has been marked as private, GitLab’s Container Registry requires authentication when downloading containers.
-
Authentication credentials will be valid while the pipeline is running, allowing for a successful initial deployment.
-
We strongly advise using GitLab Container Registry with Auto DevOps in order to simplify configuration and prevent any unforeseen issues.