Implementation
The SIP manager is the central deployment service of SIP. It handles the complete SIP application life cycle:
- Creation of the application (setup repository, configure build, create a deployment in Kubernetes)
- Deployments to staging (Creation of all needed resources and configuration of them).
- Deployments to production (Freezing a certain version, (auto) updates of existing deployments)
Therefore it needs to know certain things about your application in order to configure them during deployment. These information are kept in a file called sip.yml inside the root folder of your repository.
Architecture
SIP Manager / CRDs
SIP stores all its data inside Kubernetes Custom Resources. If you are not familar with it: it's a way to store YAML data in kubernetes. In itself these CRDs do nothing but store data, the SIP manager adds the actual functionality to the CRDs
The SIP manager is the workhorse of SIP behind the scenes. In kubernetes terms this is a controller which observes the custom resources that sip-api creates and takes care of putting them into effect. This means it transforms deployments.sip into deployments.apps, spawns and cleans databases, volumes and more, and also deletes resources if requested. It runs as container inside kubernetes.
ISG Note: In case some SIP command doesn't yield the desired result, consult the logs of sip-manager with kubectl or stack driver.
Talk
This talk was recorded to give an deep dive into Gatekeeper (/ SIP manager) as well as how to develop new features. The recording took place on 27.03.2020 so some information in the video could be outdated.
Download video: mp4 format
Slides of the Tech Talk
Postgres
We introduced two different CRDs to manage Postgres databases. The Postgreserver
CRD, which is generally only a reference to an existing Postgres Databaseserver, and the Postgres
CRD. A Postgres
resource references a Postgresserver
as well as credentials and a database name. On creation of this resource the SIP Manager will provision a corresponding database on the server.
MySQL
We also introduce two different CRDs to manage MySQL databases. The Mysqlserver
CRD, which is generally only a reference to an existing MySQL Databaseserver, and the Mysql CRD. Again a Mysql resource references a Mysqlserver
as well as credentials and a database name. On creation of this resource the SIP Manager will provision a corresponding database on the server.
S3
S3 works very much the same way. We introduce the S3store
and the Bucket
CRD. Creating a Bucket
will provision an S3 bucket on the corresponding store
Deployment
The SIP deployment resource is the most complex CRD and ties together all other resources. A Deployment
resource is a complete representation of a deployment and contains everything from image name, over ingress specification to database requirements. On creation of an SIP Deployment the SIP Manager will create all other resources that are necessary to create a complete deployment.
Application
The SIP Application is nothing more then a template for an SIP Deployment. In corresponds to release of the high level view of an Application.