Gitlab & Runner Install with Private CA SSL

This installation method is used in AWS EKS Cluster to Install Gitlab and Gitlab Kubernetes Executors. 

Tech stack used in this installations:

  • EKS Cluster(2 Node with )
  • Controller EC2 Instance (To Manage the EKS cluster)
  • Helm (Gitlab Installation)
  • SSL certs(Self-Signed/SSL Provider/Private CA)

EKS Cluster:

Creating EKS cluster is not Part of this Discussion. Please fallow this EKS Cluster creation Doc.

Controller EC2 Instance:

Create Ec2 Instance with Proffered, in this case i am using Amazon Linux AMI.(Make Sure that EKS cluster and Controller in Same VPC.) In-Order to maintain the EKS you need kubectl installed in EC2 and also you need to import the kubeconfg from the Cluster. Lets see how we can do that.

And Also, we will be using helm to Install the Gitlab.

Install Kubectl:

https://docs.aws.amazon.com/eks/latest/userguide/install-kubectl.html
curl -o kubectl https://amazon-eks.s3.us-west-2.amazonaws.com/1.18.9/2020-11-02/bin/linux/amd64/kubect
chmod +x ./kubectl
mkdir -p $HOME/bin && cp ./kubectl $HOME/bin/kubectl && export PATH=$PATH:$HOME/bin
yum install bash-completion
kubectl version --client

Install Kubectl bash completion:

yum install bash-completion
type _init_completion
source /usr/share/bash-completion/bash_completion
type _init_completion
echo 'source <(kubectl completion bash)' >>~/.bashrc
kubectl completion bash >/etc/bash_completion.d/kubectl

Get EKS Cluster list and Import kubeconfig:
(replace the –name with Cluster name)

aws eks update-kubeconfig --name <NAME OF THE EKS CLUSTER >

Install Helm:

curl -fsSL -o get_helm.sh https://raw.githubusercontent.com/helm/helm/master/scripts/get-helm-3
chmod 700 get_helm.sh
./get_helm.sh
cp /usr/local/bin/helm /usr/bin/

Install Helm Auto completion:

helm completion bash >> ~/.bash_completion
. /etc/profile.d/bash_completion.sh
. ~/.bash_completion
source <(helm completion bash)

Now, EC2 instance is ready for the Gitlab installation. Before going to install the Gitlab in EKS. Let create TLS and Generic Secrets for Gitlab and Gitlab-Runner.

You can use any other SSL provider like(Lets Encrypt, Digicert, Comodo …). Here i am using Self Signed Certificates. You can generate Self Signed Certificates with this Link.

Create TLS Secret for Gitlab’s Helm chart Global Values:

kubectl create secret tls gitlab-self-signed --cert=gitlab.gitlabtesting.com.crt --key=gitlab.gitlabtesting.com.key

Here we created secret name gitlab-self-signed with cert and Key. It is better way of mounting the SSL certificate to Ingress.

Create SSL Generic cert Secret:

This will be used for communication between the Gitlab Server and Gitlab-runner Visa SSL. (IMPORTANT: Make sure the filename you mounting Match with the Domain). in this Case my Domain name is gitlab.gitlabtesting.com.

kubectl create secret generic gitlabsr-runner-certs-secret-3 --from-file=gitlab.gitlabtesting.com.crt=gitlab.gitlabtesting.com.crt

Create service account:(This will be used for gitlab-runner to perform actions)

vim gitlab-serviceaccount.yaml
apiVersion: v1
kind: ServiceAccount
metadata:
  name: gitlab
  namespace: kube-system
---
apiVersion: rbac.authorization.k8s.io/v1beta1
kind: ClusterRoleBinding
metadata:
  name: gitlab-admin
roleRef:
  apiGroup: rbac.authorization.k8s.io
  kind: ClusterRole
  name: cluster-admin
subjects:
  - kind: ServiceAccount
    name: gitlab
    namespace: kube-system
kubectl apply -f vim gitlab-serviceaccount.yaml

Now that everything ready lets create vaules.yaml for Gitlab Values.

Example file look below.

Add Gitlab Helm to repo:

certmanager-issuer:
  email: [email protected]
certmanager:
  install: false
gitlab:
  sidekiq:
    resources:
      requests:
        cpu: 50m
        memory: 650M
  webservice:
    ingress:
      tls:
        secretName: gitlab-self-signed #TLS Secret we catered above
    resources:
      requests:
        memory: 1.5G
gitlab-runner:
  install: false
  runners:
    privileged: true
global:
  hosts:
    domain: gitlabtesting.com
  ingress:
    tls:
      enabled: true
registry:
  enabled: false
  install: false
  ingress:
    tls:
      secretName: gitlab-self-signed #TLS Secret we catered above
helm repo add gitlab https://charts.gitlab.io/

Install Gitlab with Helm with Values file we created above:

helm install gitlab gitlab/gitlab -f values.yaml

After 5 min, all the pods will be up. You can check with below command and Also get Root password of Gitlab Login:

kubectl get po


#Get Root password:

kubectl get secret gitlab-gitlab-initial-root-password -ojsonpath='{.data.password}' | base64 --decode ; echo

Now Gitlab Installation Completed. You can access the Gitlab with https://gitlab.gitlabtesting.com

Continues….

166 thoughts on “Gitlab & Runner Install with Private CA SSL”

  1. What¦s Going down i’m new to this, I stumbled upon this I’ve discovered It positively useful and it has helped me out loads. I hope to give a contribution & aid different customers like its helped me. Good job.

  2. John(Brad Pitt) ve Jane Smith(Angelina Jolie), renksiz bir evlilik süren sıradan bir şehirli çifttir. Ama her ikisi de diğerinin öğrenmek için cinayet işleyebileceği bir sır gizlemektedir: Mr. and Mrs. Smith, yüksek ücretli, olağanüstü verimlilikte kiralık katildirler ve rakip kurumlar için çalışmaktadırlar.Mr. and Mrs. Smith, birbirlerini öldürmek için kiralandıklarında evliliklerinde yeni bir heyecan kaynağı bulurlar… ve eğlence başlar. Mr. and Mrs. Smith, ölümcül yeteneklerini ortaya koyup evliliklerini müthiş bir sınava soktuklarında sonuç muhteşem bir macera yapıtına dönüşür. Bay ve Bayan Smith, Bay ve Bayan Smith izle, Antwan Bibbs

  3. Gerilime ve korku’ya hazır olun……Kar araçları ile üzücü bir kaza geçiren çift ormanda mahsur kalır. Yardım gelmesini beklerken hayatta kalmaları gerekmektedir. Jason Lipsie

  4. Lost Transmissions, şizofreni hastası olan saygı duyduğu bir adama yardımcı olmaya çalışan bir kadının hikayesini konu ediyor. Utangaç bir söz yazarı olan Hannah, saygı duyduğu plak yapımcısı Theo Ross’a ile çalışırken onda bir takım tuhaflıklar olduğunu fark eder. Şizofreni hastası olan Theo’nun ilaçlarını almayı bıraktığını fark eden Hannah, Theo’ya yardım etmeye karar verir. Theo’yu bir psikiyatri servisine götürmeye çalışan Hannah, bunun için arkadaşlarını bir araya getirmeye çalışır. Federico Orouke

  5. İngiliz komedi filmi Cenazede Ölüm’ün yeniden çevrimi… Bir cenaze ve açığa çıkan sırlar. Ölen babalarının cenazesi için toplanan aile, hiç bilmedikleri bir aile sırrı ile yüz yüze kalacaklardır. Dale Heglund

  6. Greg, abisi Rodrick’le baş başa çok zorlu bir hafta sonu geçirmek zorunda. Jeff Kinney’nin çok popüler kitap serisinin ikinci kitabından uyarlanan “Saftirik Greg’in Günlüğü: Rodrick Kuralları”nda, hep endişeli, başı felaketlerden kurtulmayan ortaokul öğrencisi Greg Heffley’nin matrak maceraları, bu kez abisi Rodrick’le aralarındaki karmaşık ilişkiye odaklanıyor. Greg, hayatının en büyük güçlüklerinden birine göğüs gererek abisi Rodrick’le baş başa bir hafta sonu geçirmek ve onun sürekli uzayan kurallar listesine uymak zorunda. Darwin Yule

  7. Ne okulda ne de evde aradığı huzuru bulamayan Nobita sonunda evden kaçmaya karar verir. Nobita’nın yakın arkadaşları Gian, Shizuka ve Suneo’nun da evden kaçmak için kendilerince geçerli sebepleri vardır. Ancak nereye gideceklerine bir türlü karar veremezler. Çünkü artık günümüzde bütün toprakların bir sahibi vardır. Doraemon’u da yanlarına alan arkadaşlar zamanda bir yolculuğa çıkarak 70.000 yıl öncesine giderler. Yani çok çok az insanın yaşadığı, yeryüzündeki toprakların henüz kimsenin olmadığı zamanlara… Ancak taş devrininde de her şey yolunda değildir. Köyde yaşayan Işık Klanı’nın başı korkunç Gigazombi’yle derttedir. Kahramanlarımız Doraemon’un yardımıyla taş devrinde barışı sağlayıp Işık Klanını korkunç Gigazombi’den kurtarmak üzere kolları sıvarlar. Stuart Gavit

  8. Yurigokoro izle. Ryosuke’nin babasının kanserin son aşamasında olduğunu öğrendiğinden kısa bir süre sonra babası hayata gözlerini yummuştur. Babasının çalışma odasında günlüğünü bulur. Günlüğün içinde ise ona büyük bir şaşkınlık yaşatan bir şey bulur; bir katilin ağzından dökülmüş cümlelerle bezeli bir not. August Naftzger

  9. Yeni boşanmış, medya tarafından hırpalanmış ve arkadaşları tarafından ihanete uğramış olan politikacı Charlie Winship, Washington’dan ve lobicilerin yolsuzluğundan bıkmıştır. Yaşamı kontrolden çıkmak üzere olan adam, uzak ve güzel bir adada hayatlarını sürdürmek için ıstakoz avcılığı yapan bir grup insanla tanıştığında onun kongreye girmesinde etkili olan idealizmini yeniden kazanarak kişisel mutluluğuna ikinci bir şans vermeye karar verir.The Congressman izle Jason Dirker

  10. Profesyonel bir kitap-ceket tanıtım yazısı uzmanı olan Ben Holmes, düğünü için Savannah’ya gitmeye çalışıyor. Son uçağı zar zor yakalar ama uçak havalanırken motora bir martı girer. Yaklaşan bir kasırga nedeniyle daha sonraki tüm uçuşlar iptal edilir, bu yüzden Sara adında çekici ama eksantrik bir kadınla Geo Metro’da otostop yapmak zorunda kalır. Elton Sweney

  11. İşkence görmüş zombi (Nicholas Hoult) yürüyen ölüleri öldürmekle görevli bir asker olan kızıyla (Teresa Palmer) yaşadığı sıradışı bir ilişkinin ardından derin bir dönüşüme uğrar… Canlı ve ölünün kurduğu zayıf iletişim köprüsü bir yanda, kavganın iki tarafındakiler de dünyanın bir daha asla eskisi gibi olamayacağını kavrar. Warm Bodies Isaac Marion’un romanına dayanan bir öykü… Mitchel Jarocki

  12. Bir çift (Anya Taylor-Joy ve Nicholas Hoult), son derece seçkin, lüks ve gizemli bir restoranda yemek yiyebilmek için bir adaya seyahat eder. Ancak yemekleri hazırlayan şef Slowik’in (Ralph Fiennes) menüye bazı şok edici sürprizler eklediği ortaya çıktığında lüks ziyafet dehşetli bir hayatta kalma mücadelesine döner. Frank Earenfight

  13. Howdy very cool blog!! Man .. Beautiful .. Amazing .. I will bookmark your web site and take the feeds also…I’m satisfied to search out so many helpful info here in the submit, we need develop more techniques in this regard, thanks for sharing.

  14. Ama Mike’a ikinci bir şans verilir ve mucizevi bir şekilde 17 yaşına geri döner. Mike’ın görünümü belki 17 yaşında gibidir, ama otuz küsur yaşındaki tavırları 2009 yılının son sınıf öğrencileri arasında hiç de havalı olmaz. Domenic Gammons

  15. I do love the manner in which you have framed this specific issue plus it does indeed present me personally a lot of fodder for thought. Nevertheless, because of just what I have experienced, I really wish when the remarks stack on that people today stay on issue and in no way start on a tirade associated with the news of the day. All the same, thank you for this excellent piece and although I do not necessarily go along with this in totality, I respect the standpoint.

  16. Hi, I think your site might be having browser compatibility issues. When I look at your website in Safari, it looks fine but when opening in Internet Explorer, it has some overlapping. I just wanted to give you a quick heads up! Other then that, fantastic blog!

  17. This design is wicked! You definitely know how to keep a reader entertained. Between your wit and your videos, I was almost moved to start my own blog (well, almost…HaHa!) Excellent job. I really loved what you had to say, and more than that, how you presented it. Too cool!

  18. I like what you guys are up too. Such intelligent work and reporting! Keep up the superb works guys I’ve incorporated you guys to my blogroll. I think it’ll improve the value of my web site :).

  19. Thanks for sharing excellent informations. Your web site is very cool. I am impressed by the details that you’ve on this site. It reveals how nicely you understand this subject. Bookmarked this web page, will come back for extra articles. You, my pal, ROCK! I found just the information I already searched all over the place and simply couldn’t come across. What an ideal web-site.

  20. Have you ever considered creating an e-book or guest authoring on other websites? I have a blog centered on the same topics you discuss and would really like to have you share some stories/information. I know my subscribers would appreciate your work. If you’re even remotely interested, feel free to shoot me an email.

  21. I have been browsing on-line more than 3 hours these days,
    yet I by no means discovered any fascinating article like yours.
    It is pretty value sufficient for me. Personally,
    if all web owners and bloggers made excellent content as you probably did, the internet will probably be a lot more helpful than ever before.

Leave a Reply

Your email address will not be published. Required fields are marked *