How we automated the entire server lifecycle

Hello, Habr! My name is Alexey Nazarov . I am engaged in automation in the department of administration of infrastructure systems in the National Payment Card System (NSPK JSC) and would like to tell a little about our internal products that help us develop.



If you have n't read the post about our infrastructure yet , then it's time! After reading this post, I would like to talk about some of the internal products that we have developed and implemented.



image



Our company, like any other, has its own regulations and business processes. One of them is the one according to which we create servers or a server stand at the request of the Jira ServiceDesk. The server has a functional administrator, i.e. owner. Servers also have a status (Test, Productive, UAT, etc.). Due to the statuses and other characteristics, the servers must be located in their segment, data center, datastore, network, etc. So, in order to create a server, you first need to: create a server in VMware, set its name, ip, dns and other important parameters, and then run the ansible-playbook.



History of development



2015 . , . - c , . 1- : , , .. 1- . , . 1-.



excel-. ip phpIPAM https://phpipam.net/. phpIPAM — open source . . 700.



: , Windows, Linux. , .



. , . . :



  1. , , ...
  2. Vcenter
  3. bash- ansible-playbook’
  4. excel-
  5. ip phpIPAM
  6. ,


, . .



. phpIPAM . . , excel, .



Python, - Django. CMDB . . ? …





. 5000 . , - .

:



image



, , .



image



:



  • ( , , )
  • , , /


image







:



1) ip phpIPAM

2) Jira ServiceDesk ( )

3) dcTrack (https://www.sunbirddcim.com/)



1) REST API Zabbix

2) REST API

3) 1 Active Directory , , , . , , , .



DitNet



10 . , - PCI-DSS.



json , VMware. json rsync ftps — .



, . bashsible, ansible , molecule (https://molecule.readthedocs.io/), VMware . VMware ( 900).



. Distributed Switch «test2», 192.168.1.0|24_test2. , json phpIPAM VMware.



:



1) DitNet VMware (, , , .). json



2) VMware



3) , Jira ServiceDesk jql- «». VMware (. ). , .





4) «», Jira ServiceDesk « »



5) json (, dns, ip ..) ( )



6) DitNet . ( : « »)



7) DitNet 5 Celery beat, ,



8) Celery worker :



a. VMware ( pyvmomi)

b. gitlab

c. Ansible-playbook ( https://docs.ansible.com/ansible/latest/dev_guide/developing_api.html)

d. Molecule

e.



9) . – Jira ServiceDesk. - , Vmware Ansible.



Ditnet :



  • . Ansible setup. . Windows Linux.
  • SNMP . , BIOS, IPMI ..
  • Freeipa (HBAC, SUDO ), Active Directory.
  • . :


image



, DitNet, . .





DitNet . .

Gitlab . Ansible-playbook, Gitlab CI . Pipeline:



image



pipeline , unit-. , , .

Ansible-playbook Ansible Tower (AWX) , .



DitNet docker, . docker-compose. docker-compose services systemd.







  • … !


P.S. ! !




All Articles