S
S
Sergey Durov2018-04-26 10:05:38
Ansible
Sergey Durov, 2018-04-26 10:05:38

How perverted am I with ansible & jenkins?

The project is written in nodejs. Deploy looks like this:
1) Komich in the branch.
2) Jenkins picks up the changes.
3) Runs tests
4) If successful, launches ansible-playbook, which connects to the production server and updates the application.
As a result, ansible and jenkins do the same job twice (download the project, install npm packages) which is quite a long time. I know that there are artifacts, and as I understand it, you can send them directly to the server using the archive and remove ansible from this chain altogether.
Question:
1) Do I understand correctly that I do not need ansibile?
2) How accurate is my process?

Answer the question

In order to leave comments, you need to log in

3 answer(s)
D
Danil Biryukov-Romanov, 2018-04-26
@urtow

Have you thought about Docker?
1) A commit has begun
2) We have assembled the Docker container (it already contains all Npm packages and the project)
3) We ran the tests
4) If everything is ok, the same Docker was launched on the production.

S
Saboteur, 2018-04-26
@saboteur_kiev

So you can see what exactly ansible does.
If the whole playbook is to copy the file, run Npm, then you can do it just with a shell script and throw out Ansible.
Ansible is needed to simplify the administration of many servers. And for two servers, you can write a one-line hermit.

P
Puma Thailand, 2018-04-26
@opium

Globally, if it works fast enough, then it's easier to leave it like that

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question