All Projects → IBM → Kubernetes Container Service Gitlab Sample

IBM / Kubernetes Container Service Gitlab Sample

Licence: apache-2.0
This code shows how a common multi-component GitLab can be deployed on Kubernetes cluster. Each component (NGINX, Ruby on Rails, Redis, PostgreSQL, and more) runs in a separate container or group of containers.

Programming Languages

shell
77523 projects

Projects that are alternatives of or similar to Kubernetes Container Service Gitlab Sample

Gameon Java Microservices On Kubernetes
This code demonstrates deployment of a Microservices based application Game On! on to Kubernetes cluster. Game On! is a throwback text-based adventure built to help you explore microservice architectures and related concepts.
Stars: ✭ 88 (-63.33%)
Mutual labels:  bluemix, ibmcode, containers
Scalable Cassandra Deployment On Kubernetes
In this code we provide a full roadmap the deployment of a multi-node scalable Cassandra cluster on Kubernetes. Cassandra understands that it is running within a cluster manager, and uses this cluster management infrastructure to help implement the application. Kubernetes concepts like Replication Controller, StatefulSets etc. are leveraged to deploy either non-persistent or persistent Cassandra clusters on Kubernetes cluster.
Stars: ✭ 184 (-23.33%)
Mutual labels:  bluemix, ibmcode, containers
Scalable Wordpress Deployment On Kubernetes
This code showcases the full power of Kubernetes clusters and shows how can we deploy the world's most popular website framework on top of world's most popular container orchestration platform.
Stars: ✭ 173 (-27.92%)
Mutual labels:  bluemix, ibmcode, containers
banking-digitalization-using-hybrid-cloud-with-mainframes
The following journey will introduce the available Banking APIs published on IBM Cloud with logical business programs running on the IBM Z Mainframe through a simulated retail bank called MPLbank.
Stars: ✭ 21 (-91.25%)
Mutual labels:  bluemix, ibmcode
watson-multimedia-analyzer
WARNING: This repository is no longer maintained ⚠️ This repository will not be updated. The repository will be kept available in read-only mode. A Node app that use Watson Visual Recognition, Speech to Text, Natural Language Understanding, and Tone Analyzer to enrich media files.
Stars: ✭ 23 (-90.42%)
Mutual labels:  bluemix, ibmcode
detect-timeseriesdata-change
WARNING: This repository is no longer maintained ⚠️ This repository will not be updated. The repository will be kept available in read-only mode.
Stars: ✭ 21 (-91.25%)
Mutual labels:  bluemix, ibmcode
node-red-dsx-workflow
This journey helps to build a complete end-to-end analytics solution using IBM Watson Studio. This repository contains instructions to create a custom web interface to trigger the execution of Python code in Jupyter Notebook and visualise the response from Jupyter Notebook on IBM Watson Studio.
Stars: ✭ 26 (-89.17%)
Mutual labels:  bluemix, ibmcode
Spring Boot Microservices On Kubernetes
In this code we demonstrate how a simple Spring Boot application can be deployed on top of Kubernetes. This application, Office Space, mimicks the fictitious app idea from Michael Bolton in the movie "Office Space".
Stars: ✭ 504 (+110%)
Mutual labels:  ibmcode, containers
visualize-data-with-python
A Jupyter notebook using some standard techniques for data science and data engineering to analyze data for the 2017 flooding in Houston, TX.
Stars: ✭ 60 (-75%)
Mutual labels:  bluemix, ibmcode
Docker Gitlab
Dockerized GitLab
Stars: ✭ 7,084 (+2851.67%)
Mutual labels:  gitlab, containers
Drupal Nginx Php Kubernetes
Demonstration of a set of NGINX and PHP-FPM containers running Drupal deployed to Kubernetes on the IBM Container Service. This is a work in progress.
Stars: ✭ 43 (-82.08%)
Mutual labels:  bluemix, containers
Cognitive Social Crm
An application that monitors a Twitter feed and determines customer sentiment using IBM Watson Assistant, Tone Analyzer, Natural Language Understanding, as well as CloudantDB
Stars: ✭ 71 (-70.42%)
Mutual labels:  bluemix, ibmcode
ibm-cloud-functions-serverless-ocr-openchecks
Serverless bank check deposit processing with object storage and optical character recognition using Apache OpenWhisk powered by IBM Cloud Functions. See the Tech Talk replay for a demo.
Stars: ✭ 40 (-83.33%)
Mutual labels:  bluemix, ibmcode
Serverless Home Automation
WARNING: This repository is no longer maintained ⚠️ This repository will not be updated. The repository will be kept available in read-only mode.
Stars: ✭ 38 (-84.17%)
Mutual labels:  bluemix, ibmcode
Cognitiveconcierge
WARNING: This repository is no longer maintained ⚠️ This repository will not be updated. The repository will be kept available in read-only mode.
Stars: ✭ 100 (-58.33%)
Mutual labels:  bluemix, ibmcode
Nstack
Type-safe, composable microservices for data analytics
Stars: ✭ 219 (-8.75%)
Mutual labels:  containers
Akash
a secure, transparent, and peer-to-peer cloud computing network
Stars: ✭ 229 (-4.58%)
Mutual labels:  containers
Vuex Feature Scoped Structure
📈 Feature scoped Vuex modules to have a better organization of business logic code inside Vuex modules based on Large-scale Vuex application structures @3yourmind
Stars: ✭ 218 (-9.17%)
Mutual labels:  containers
Blockchainnetwork Compositejourney
Part 1 in a series of patterns showing the building blocks of a Blockchain application
Stars: ✭ 217 (-9.58%)
Mutual labels:  ibmcode
Cwltool
Common Workflow Language reference implementation
Stars: ✭ 235 (-2.08%)
Mutual labels:  containers

Build Status

GitLab deployment on Kubernetes Cluster

Read this in other languages: 한국어中国 .

This project shows how a common multi-component workload, in this case GitLab, can be deployed on Kubernetes Cluster. GitLab is famous for its Git-based and code-tracking tool. GitLab represents a typical multi-tier app and each component will have their own container(s). The microservice containers will be for the web tier, the state/job database with Redis and PostgreSQL as the database.

By using different GitLab components (NGINX, Ruby on Rails, Redis, PostgreSQL, and more), you can deploy it to Kubernetes. This example is also deployable using Databases for PostgreSQL in IBM Cloud as the database.

Flow

  1. The user interacts with GitLab via the web interface or by pushing code to a GitHub repository. The GitLab container runs the main Ruby on Rails application behind NGINX and gitlab-workhorse, which is a reverse proxy for large HTTP requests like file downloads and Git push/pull. While serving repositories over HTTP/HTTPS, GitLab utilizes the GitLab API to resolve authorization and access and serves Git objects.

  2. After authentication and authorization, the GitLab Rails application puts the incoming jobs, job information, and metadata on the Redis job queue that acts as a non-persistent database.

  3. Repositories are created in a local file system.

  4. The user creates users, roles, merge requests, groups, and more—all are then stored in PostgreSQL.

  5. The user accesses the repository by going through the Git shell.

Included Components

Prerequisites

Create a Kubernetes cluster with either Minikube for local testing, or with IBM Cloud Kubernetes Service to deploy in cloud. The code here is regularly tested against Kubernetes Cluster from IBM Cloud Kubernetes Service using Travis.

Helm to install GitLab's Cloud Native charts.

Steps

  1. Clone the repo
  2. Create IBM Cloud Kubernetes Service
  3. Install Helm
  4. Configure GitLab and Install
  5. Launch GitLab

1. Clone the repo

Clone the repo and go in the cloned directory

$ git clone https://github.com/IBM/Kubernetes-container-service-GitLab-sample/

2. Create IBM Cloud Kubernetes Service

Create an IBM Cloud Kubernetes Service if you don't already have one:

3. Install Helm

If you don't have the Helm client in your machine, you can find one in the official releases page.

To install Helm in your Kubernetes Cluster, do:

$ helm init

Add the official gitlab repo:

$ helm repo add gitlab https://charts.gitlab.io/
$ helm repo update

To verify installation of Helm in your cluster:

$ helm version

Client: &version.Version{SemVer:"v2.11.0", GitCommit:"2e55dbe1fdb5fdb96b75ff144a339489417b146b", GitTreeState:"clean"}
Server: &version.Version{SemVer:"v2.11.0", GitCommit:"2e55dbe1fdb5fdb96b75ff144a339489417b146b", GitTreeState:"clean"}

For more info in installing helm, you can find the official documentation here. The helm version that you install should be the same version or a previous version to the version of the cluster (i.e. the Server version in helm version). If the helm version is newer than the cluster, the command may not work as expected.

4. Configure GitLab and Install

You can find the official helm chart repo for Cloud Native GitLab deployment here. This can guide you in configuring your own deployment for production use.

A sample configuration config.yaml in this repo can help you get started with GitLab in IKS. This yaml file is configured to use the provided ingress controller with IKS. The components (Gitaly, Postgres, Redis, Minio) will not use any persistent storage for now.

Modify config.yaml file to use your own Ingress Subdomain, certificate, and IP.

$ bx cs cluster-get <CLUSTER_NAME>

## You should look for these values
## ...
## Ingress Subdomain:	anthony-dev.us-south.containers.appdomain.cloud
## Ingress Secret:	anthony-dev
## ...

To get the ALB (Application Load Balancer) IP address of your cluster:

$ bx cs albs --cluster <CLUSTER_NAME>

## Get the IP Address from the public ALB
## ALB ID             Enabled   Status     Type      ALB IP         Zone
## private-...-alb1   false     disabled   private   -              -
## public-...-alb1    true      enabled    public    169.XX.XX.XX   dal13

You can now fill in your own values of INGERSS_SUBDOMAIN, INGRESS_SECRET, and ALB_IP in config.yaml

Install GitLab by doing:

$ helm upgrade --install gitlab gitlab/gitlab -f config.yaml

5. Launch GitLab

Installing GitLab can take minutes to setup. You can check the status of your deployment:

$ kubectl get pods

NAME                                       READY     STATUS             RESTARTS   AGE
gitlab-gitaly-0                            1/1       Running            0          3m
gitlab-gitlab-runner-7554ff7c9d-2rt7x      0/1       Running            4          3m
gitlab-gitlab-shell-78b8677b59-9z9m2       1/1       Running            0          3m
gitlab-gitlab-shell-78b8677b59-hssqc       1/1       Running            0          2m
gitlab-migrations.1-74xqt                  0/1       Completed          0          3m
gitlab-minio-7b67585cf5-tc4gh              1/1       Running            0          3m
gitlab-minio-create-buckets.1-bdbhk        0/1       Completed          0          3m
gitlab-postgresql-7756f9c75f-pzvlj         1/1       Running            0          3m
gitlab-redis-554dc46b4c-jlkps              2/2       Running            0          3m
gitlab-registry-75cdd8cc6d-n6fx6           1/1       Running            0          2m
gitlab-registry-75cdd8cc6d-nz9sq           1/1       Running            0          3m
gitlab-sidekiq-all-in-1-5865f7f999-wvg6c   1/1       Running            0          3m
gitlab-task-runner-d84b7b9b9-9mc9k         1/1       Running            0          3m
gitlab-unicorn-596cbf98cc-kqrsr            2/2       Running            0          3m
gitlab-unicorn-596cbf98cc-mjbtn            2/2       Running            0          2m

If all your pods are now running, you can now go to your GitLab installation by visiting https://gitlab.<INGRESS_SUBDOMAIN>

Now that Gitlab is running you can register as a new user and create a project.

To try GitLab with persistent storage, you can explore config-persistent.yaml and use that instead of config.yaml. This will use dynamic storage provisioning that's provided with IKS.

You can learn how to expose the port 22 here with the ingress controller to clone repositories using SSH.

Troubleshooting

If a pod doesn't start examine the logs.

kubectl get pods
kubectl logs <pod name>

Cleanup

To delete your GitLab installation:

$ helm delete gitlab --purge

License

This code pattern is licensed under the Apache Software License, Version 2. Separate third party code objects invoked within this code pattern are licensed by their respective providers pursuant to their own separate licenses. Contributions are subject to the Developer Certificate of Origin, Version 1.1 (“DCO”) and the Apache Software License, Version 2.

ASL FAQ link: https://www.apache.org/foundation/license-faq.html#WhatDoesItMEAN

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].