Docker-compose
Docker-compose components
Docker-compose is one of the methods to create components within [bunnyshell.yaml](environment-definition)
.
Adding components from a docker-compose.yaml
file is straightforward, and it will create one of the 3 environment component types, depending on what's being added.
Important note
The conversion from
docker-compose.yaml
tobunnyshell.yaml
is one-time and one-way.When the
docker-compose.yaml
file is being added to the environment, it is parsed and the correspondingbunnyshell.yaml
contents is generated, and from that point on, the management of the components will be performed solely frombunnyshell.yaml
.Updating
docker-compose.yaml
will NOT automatically updatebunnyshell.yaml
.
Essentially, all 3 kinds operate the same way, with the exception that some room for specific developments was left for Databases
(with regards to seeding, for example).
Applications
and Services
differ only semantically, but operate identically.
Application
Applications are used for (you guessed it...) applications. They are designed to be used for pieces of software in your stack which are written by you and need to be built.
They are translated from docker-compose services with an image to be built, and must not fall into the Database
conditions.
Database
A component will be categorised as a Database
if:
- the name of the image or the name of the docker-compose service contains one of mysql, percona, mariadb, sql, postgre, mongo, clickhouse, database
- it exposes one of the ports 3306, 27017, 5432, 5433, 8123
- the name of the docker-compose service contains
Service
Services
are designed to be used for pieces of software in your stack which are not written by you. A Service
is a component translated from docker-compose which is nor Database
nor Application
.
Resources
Docker-compose resources are fully managed by Bunnyshell.
For each component, Bunnyshell creates the needed Kubernetes resources, for example:
dockerCompose.environment
will create a KubernetesConfigMap
dockerCompose.ports
will create a KubernetesService
hosts
will create a KubernetesIngress
Resource cleanup
When updating/changing the Component, some resources may need to disappear, eg. removing all exposed ports will result in the associated Kubernetes Service
to disappear.
The platform adds a label (app.bunnyshell.com/deploy-version
) on each resource with every deployment. After a deployment is completed, resources which have a different value for app.bunnyshell.com/deploy-version
will be deleted.
Resources not managed by Bunnyshell (not having the app.kubernetes.io/instance-${componentName}=bns
label) will be left untouched.
Updated 23 days ago