Update README to make it Kubernetes oriented

parent d3b999df
## OpenShift auto-deployments (EXPERIMENTAL)
## Kubernetes auto-deployments (EXPERIMENTAL)
This is repository that builds Docker Image with all scripts needed to
deploy to OpenShift from GitLab CI.
deploy to Kubernetes from GitLab CI.
It basically consist of two stages:
1. Build stage where a Docker Image is built,
2. Deploy stage where a previously built Docker Image is run on OpenShift and
2. Deploy stage where a previously built Docker Image is run on Kubernetes and
exposed on hostname.
### Build stage
......@@ -29,17 +29,16 @@ The deploy script does:
### Requirements
1. GitLab Runner using Docker or Kubernetes executor with privileged mode enabled,
2. Service account for existing OpenShift cluster,
2. Service account for existing Kubernetes cluster,
3. DNS wildcard domain to host deployed applications.
### Limitations
1. Only public docker images can be deployed,
2. There is no upgrades for OpenShift existing deployments,
3. There is no ability to pass environment variables to deployed application,
4. Currently we do not have a way to watch for deployment status and make sure
2. There is no ability to pass environment variables to deployed application,
3. Currently we do not have a way to watch for deployment status and make sure
that deployment did succeed,
5. Currently we do not have a way to expose `mysql`, `postgres` or other database
4. Currently we do not have a way to expose `mysql`, `postgres` or other database
services.
### Examples
......@@ -56,7 +55,7 @@ You can then start using your own docker image hosted on your Container Registry
### How to use it?
Basically, configure Kubernetes Service in your project settings and
copy-paste [this `.gitlab-ci.yml`](https://gitlab.com/gitlab-org/gitlab-ci-yml/blob/master/autodeploy/OpenShift.gitlab-ci.yml).
copy-paste [this `.gitlab-ci.yml`](https://gitlab.com/gitlab-org/gitlab-ci-yml/blob/master/autodeploy/Kubernetes.gitlab-ci.yml).
### License
......
......@@ -40,6 +40,8 @@ metadata:
namespace: $KUBE_NAMESPACE
labels:
app: $CI_ENVIRONMENT_SLUG
pipeline-id: $CI_PIPELINE_ID
build-id: $CI_BUILD_ID
spec:
replicas: 1
template:
......@@ -47,6 +49,8 @@ spec:
labels:
name: $CI_ENVIRONMENT_SLUG
app: $CI_ENVIRONMENT_SLUG
pipeline-id: $CI_PIPELINE_ID
build-id: $CI_BUILD_ID
spec:
containers:
- name: app
......@@ -75,6 +79,8 @@ metadata:
namespace: $KUBE_NAMESPACE
labels:
app: $CI_ENVIRONMENT_SLUG
pipeline-id: $CI_PIPELINE_ID
build-id: $CI_BUILD_ID
spec:
ports:
- name: web
......@@ -90,6 +96,8 @@ metadata:
namespace: $KUBE_NAMESPACE
labels:
app: $CI_ENVIRONMENT_SLUG
pipeline-id: $CI_PIPELINE_ID
build-id: $CI_BUILD_ID
annotations:
kubernetes.io/tls-acme: "true"
kubernetes.io/ingress.class: "nginx"
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment