Skip to content

GoAlexander/infrastructure-deploy

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

67 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

infrastructure-deploy

The idea of the project is to create full-stack exampleproject to share with community knowledge and vision how can be CI infrastructure be developt (from scratch) for medium/big size open/closed/hybrid source projects.

Our vision of good CI-infrastructure or the values of our project:

  • Invest now to have provit in the long-term
  • Infrastructure as a service
  • Flexibility to change
  • Easy to support
  • Modularity of infrastructure. Each part of our CI-project can be changed with another "block" with no ir minimal investment.
  • Python as one and only language
  • Maximum re-use of public supported tools and frameworks

Table of analyzed and used software

Domain Product Pros Cons Comment
CI Buildbot More freedom and power
No UI to configure
Higher costs at the start
No sub-service to collect artifacts
Open Source
TeamCity      
Jenkins Open Source    
Travis CI Free for Open Source
Is a service

Only for Github-hosted repositories  
Virtualization QEMU      
Docker      
VMWare Easy to use High cost  
Open VZ

Effective resource management

Only for linux  
KVM

Win/Lin

Effective and usefull

Need knowledge about Unix systems  
Xen

Win/Lin

Good optimization

Open source

   
LXC

Linux

Very effective in small builds

Not for Windows  
Provisioning Ansible does not require installation of agents on managed nodes; ow threshold of entry; Modules can be written in almost any language;The web interface allows you to customize users, teams and equipment, use scripts; script language is pretty simple;Installing Python version 2.4 or higher; good documentation; Lacked client support for Windows The web interface is not automatically linked to an existing Ansible installation;  
TBD      
"Frontend"
(repository, issues tracker,
communication, review,
collaboration)
GitHub Standart de-facto    
Gitlab More features as in Github On Windows does not use pure Windows env (Cygwin)  
Gerrit + Jira   Outdated. Poor social features.  
Web Server NGNX Documentation and support
Modularity
Centralized configuration
Administrators are responsible for security
Has proxy server
Processes only static content Will be used for artifacts sharing. Link: https://stackshare.io/stackups/apache-httpd-vs-microsoft-iis-vs-nginx
Apache Documentation and support
Modularity
Distributed configuration
Processes dynamic and static content
Distributed configuration
Users are responsible for security
 
Monitoring Zabbix

Active community support

Good documentation

SNMP

Agents

1 database

Web UI can not be expanded

 
Icinga 2 compatible with Nagios, easy to integrate, parallel processes sometimes need to develop your own modules, poor documentation, complex for small systems  
Build System TBD      
Test System Robot Framework      
Self-written      
TBD      

On host OS (Ubuntu 18.04)

  • Install host OS manually on your machine
sudo apt-get install openssh-server mc net-tools nginx screen
sudo apt install python3-pip

# take nginx configuration from our repository
# you can read more about nginx configuration here: http://docs.buildbot.net/current/manual/configuration/www.html?highlight=proxy#reverse-proxy-configuration
sudo nano /etc/nginx/nginx.conf
service nginx restart

# Add new user
sudo adduser infra-deploy #without adding to sudoers
users #check list of users
  • Install QEMU which will be used for virtualization
sudo apt-get install qemu-kvm qemu virt-manager virt-viewer libvirt-bin

Installation of Ansible on Ubuntu host

Install Ansible:

sudo apt-get update
sudo apt-get install software-properties-common
sudo apt-add-repository --yes --update ppa:ansible/ansible
sudo apt-get install ansible

Test Ansible installation:

# Run this by name this file hello_world.yml and run the following in the same directory
# ansible-playbook hello_world.yml -i 'local,' --connection=local

- hosts:
  - local
  tasks:
  - name: Hello World!
    shell: echo "Hi! Ansible is working."
  - name: Create a directory
    file: path=hello_world state=directory

On virtual machines

Install packages:

# General packages
sudo apt-get install python3-pip git
sudo apt-get install mc htop
  
# Buildbot packages
# On master
sudo pip3 install buildbot==1.5 buildbot-console-view==1.5 buildbot-www==1.5

# On worker
sudo pip3 install buildbot-worker==1.5
sudo pip3 install gitpython==2.1.5 tenacity==4.5.0 txrequests txgithub service_identity

Create Buildbot master (on VM for master):

buildbot create-master master

Add auto load of master:

#copy buildbot-master.service file to the machine https://github.com/GoAlexander/infrastructure-deploy/tree/master/etc/systemd/system
sudo systemctl restart buildbot-master

#check status
sudo systemctl status buildbot-master

#if all is ok enable unit
sudo systemctl enable buildbot-master

Create Buildbot worker (on VM for worker):

buildbot-worker create-worker --umask=0o2 "worker" "192.168.122.157:9000" "your_worker_name" "your_worker_pass"

Credits

Big thanks for the ideas, support and inspiration to:

  • Alexander Zhogov
  • Oleg Makarov
  • Eugeny Ponomarev
  • Dmitry Lobanov

About

Create modular, scalable CI infrastructure based on Buildbot

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •  

Languages