Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
K
kubernetes-deploy
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
open-source
kubernetes-deploy
Commits
68e52ba4
Unverified
Commit
68e52ba4
authored
Jan 16, 2017
by
Kamil Trzcinski
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update README to make it Kubernetes oriented
parent
d3b999df
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
16 additions
and
9 deletions
+16
-9
README.md
README.md
+8
-9
deploy
deploy
+8
-0
No files found.
README.md
View file @
68e52ba4
##
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
...
...
deploy
View file @
68e52ba4
...
...
@@ -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"
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment