All the kubernetes yaml files created.
This repositoriy contains a pipeline that allow to launch microservices into a kubernetes cluster.
- Jenkins- Git
- Kubernetes token as jenkins secret text
- Kubeconfig file as jenkins secret file
- Git user if repositoriy is private as jenkins secret text
- Git token if repository is private as jenkins secret text
- Fill the next pipeline parameters (line 6):
GH_URL | Git URL where pipeline are stored |
GH_USER | Git user |
K_URL | Master kubernetes node url |
FIRST_RANGE_PORT | First range port that microservice could use |
FINAL_RANGE_PORT | Last range port that microservice could use |
USED_PORTS | File path with all used ports |
KNOWED_PORTS | File path with all knowed ports |
NAME | TYPE | DESCRIPTION |
NOMBRE_MS | Text | Git subdirectory |
INT | Boolean | Launch microservice over preproduction environment |
PROD | Boolean | Launch microservice over production environment |
TEMPLATE | Boolean | Launch microservice using a kubernetes template |
To deploy a microservice over preproduction/production environemnt mark INT or INT as true. The NOMBRE_MS is a reference to a github subdirectory. For example, to deploy MySQL over prepoduction environment the value NOMBRE_MS has to be mysql. Inside of this subdirectory there are all the yaml files. By now the kind of yaml files accepted are deployments, services, presistent volumes and persistent volume claims. By default preproduction kubernetes namespaces is "int" (line 92) and production kubernetes namespace is "pro" (line 123).
There is a template subdirectory with all the yaml files and a properties file. This files can be used to launch a microservice with custom values. All empty sections are interpeted as nothing to deploy. For example, if service parameters section are empty the pipeline don't will create a service to this microservice. Once properties file edition is done just mark as true the TEMPLATE parameter input and execute the pipeline.