GithubHelp home page GithubHelp logo

rojberr / preconfigured-gitlab Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 1.3 MB

This Infrastructure as a Code repo deploys preconfigured Gitlab to build, test and deploy other projects! ๐Ÿ‘ท

Shell 18.12% HCL 80.79% Smarty 1.08%
ansible gitlab infrastructure-as-code terraform

preconfigured-gitlab's Introduction

preconfigured-gitlab

This repository creates preconfigured GitLab to download Your repos and run their CI/CD pipelines in EC2. ๐Ÿ”จ

Create your GitLab server only when you need it and destroy it afterwards using simple Terraform commands! ๐Ÿ’ฅ This will reduce your costs to minimum!

Use my init script and adapt them to your environment to quickly recreate a preconfigured GitLab for your own needs! Turn it on and off whenever your want. ๐Ÿ˜Ž

Foto von Life Of Pix - Fliessender Zement

Usage:

  1. Install AWS CLI and Terraform.

  2. Create AWS access keys and export them:

$ export AWS_ACCESS_KEY_ID=AK************IEVXQ
$ export AWS_SECRET_ACCESS_KEY=gbaIbK*********************iwN0dGfS

, or configure a default AWS profile

aws configure --profile default
AWS Access Key ID [None]: AK************IEVXQ
AWS Secret Access Key [None]: gbaIbK*********************iwN0dGfS
Default region name [None]: eu-central-1
Default output format [None]: json
  1. Create preconfigured-gitlab-key certificate key to be able to login using ssh

  2. Execute:

cd infrastructure-terra
terraform init

, and then:

terraform apply

, confirm with 'yes' and enjoy your newly created AWS EC2 GitLab server ;) The IP will be randomly generated and printed in the console output.

       *.                  *.
      ***                 ***
     *****               *****
    .******             *******
    ********            ********
   ,,,,,,,,,***********,,,,,,,,,
  ,,,,,,,,,,,*********,,,,,,,,,,,
  .,,,,,,,,,,,*******,,,,,,,,,,,,
      ,,,,,,,,,*****,,,,,,,,,.
         ,,,,,,,****,,,,,,
            .,,,***,,,,
                ,*,.
     _______ __  __          __
    / ____(_) /_/ /   ____ _/ /_
   / / __/ / __/ /   / __ `/ __ \
  / /_/ / / /_/ /___/ /_/ / /_/ /
  \____/_/\__/_____/\__,_/_.___/


Thank you for installing GitLab!
GitLab should be available at http://<random-ip>/
  1. To destroy you EC2 instance execute:
terraform destroy

... and type: 'yes'.

Deploy your GitLab instance only when needed to reduce the costs and destroy it afterwards ;)

So far this server is only created and doesn't include any ready to go pipelines or repos.

GitLab welcoming screen

Need further support?

Contact me if you need help at [email protected] .

Quick TODO list:

  • use Amazon EC2 Spot Instances,

  • adhere to Spot Instances best practices,

  • automate with Kubernetes the deployment, management, and scaling of containers

  • setting up the infra / server

  • downloading gitlab or container hosted?

  • installation / first setup

  • unlocking gitlab for the first time (token?)

  • user creation (at least one for each: guest / dev / admin) with roles

  • gitlab master runners setup (one master and create at least one runner) (master - scheduling jobs, communicating and giving instr) (runner - execute jobs, takes cmds from master)

  • configure global security for runners

  • build pipelines (at least one for each project)

  • schedule some nightly / periodic builds

  • configure build triggers on git push (webhook and poll scm)

  • delegate user database or include LDAP

  • configure:

  • set system message

  • set # executors

  • email notifications (use plugin extended e-mail notification)

  • configure smtp (gmail? / docker mailserver)

  • html reports after tests

  • add .gitlab-ci.yml to each project

  • pipelines to build docker image from Dockerfile and upload to Dockerhub

  • multibranch jobs ?? like in jenkins?

  • deploy with AWS marketplace image? and then edit /etc/gitlab/gitlab.rb ? sudo gitlab-ctl reconfigure

preconfigured-gitlab's People

Contributors

rojberr avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.