Skip to content

Webserver

The goal is to use a git repository hosted on gitlab as single source of truth. Also the infrastructure to host the services should be defined as code inside the git repository. The Deployment should be done automatically.

The following services should be provided:

Update Workflow

graph LR Gitlab --push--> Container_Registry PC --push--> Gitlab Gitlab --push-->Testsetup Gitlab --push-->Webspace Webspace --pull-->Container_Registry Testsetup --pull--> Container_Registry

Used technologies

  • use gitlab CI/CD for automation
  • Build the docker images with kaniko through the gitlab runner
  • Push the docker images to the gitlab registry
  • configure the webspace server through Ansible
  • update the container images through Ansible
  • execute the ansible scripts through gitlab CI/CD
    • generate own ansible docker image (there is no up to date image on docker hub)
  • generate new DNS entry for kaier.de
  • Install SSL Certificat
  • Test environment

Git repository Structure

This is the basic structure of the git repository. This repository holds all information defining the webserver configuration and the services running on this server

.
├── ansible
│   ├── vars
│   ├── hosts
│   └── ... // ansible playbooks
├── website
│   ├── docs
│   ├── mkdocs.yml
│   └── dockerfile
├── nextcloud
│   └── dockerfile
└── .gitlab-ci.yml