-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Ansible Deployment. #54
base: develop
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Will check today on clean VM. didn't have a time last few days :(
README.md
Outdated
make | ||
make altinstall | ||
[barmaglot] | ||
your_server_ip |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ntodosiychuk what should be provided here as server_ip?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if you want to configure local machine add the next:
[barmaglot]
127.0.0.1
In other case add remote server ip.
README.md
Outdated
@@ -59,14 +69,14 @@ sudo apt-get install icecast2 | |||
(default icecast config is here /etc/icecast2/icecast.xml) | |||
|
|||
|
|||
#####Production related | |||
###Production related | |||
Run Ansible Production Playlist |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
playlist or playbook
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you are right )
npm: | ||
path={{ app_dir }} | ||
|
||
- name: Building Webpack Dev build |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think build output log files should be added to gitignore
README.md
Outdated
(Python related stuff) | ||
###to install project on clean VM: | ||
#####Step 1 — Installing Ansible | ||
Add the Ansible PPA and refresh our system's package index, install the ansible |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
our
-> your
Updated |
README.md
Outdated
Activate virtual env | ||
10.source env/bin/activate | ||
11.pip install -r requirments.txt | ||
$ sudo vim /etc/ansible/hosts |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
btw vim
is not installed iun clean Ubuntu VM, at least this apllyes for 16.04 LTS. This could be replaced with vi
:D
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Or default edit ;)
README.md
Outdated
and test connection via ansible: | ||
|
||
``` | ||
$ ssh root@your_server_ip |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
few remarks about this step.
- It is possible that not all users know their
root
password. Basically I presume that user withsudo
access is enough - in case of setting
127.0.0.1
as a[barmaglot]
I got UNREACHEBLE error after ping command. This can be fixed by setting
[barmaglot] 127.0.0.1 ansible_connection=local
I think this is some specific settings if you want to run Ansible locally, but maybe I am wrong :)
README.md
Outdated
In case if you do not have Python 3.5: | ||
|
||
``` | ||
$ cd ansible |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe I missed that but we don't have step where you actually clone repo with project. I know that's obvious that any developer should do it , but still
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Already added Step #3
|
||
tasks: | ||
|
||
- name: Install Git |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
small issue - you will not be able to install git from ansible playbook because at that moment you should already have git as you clone this repo :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed
4. ln -s /usr/bin/nodejs /usr/bin/node | ||
5. ./build_js.sh | ||
$ cd ansible | ||
$ ansible-playbook -s playbooks/system_packages.yml --ask-sudo-pass |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think bin/install_python3_5.sh
file that is requires for this playbook is missing from this branch
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yep, you are right!
Ansible fixes
…nto db_model_refactoring
@wolendranh |
@@ -0,0 +1,32 @@ | |||
#!/bin/bash |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ntodosiychuk btw:I found out that we can completely replace bash with ansible, at least for Python installation:)
I will fill in pull request this week end.
spoiler:D :
tasks:
- name: get&unpack Python
sudo: yes
sudo_user: "{{ lookup('env', 'USER') }}"
unarchive:
src: https://www.python.org/ftp/python/3.5.1/Python-3.5.1.tar.xz
dest: {{ app_dir }}
remote_src: True
- name: compile Python
sudo: yes
sudo_user: "{{ lookup('env', 'USER') }}"
command: chdir={{ app_dir }}/Python-3.5.1 {{ item }}
with_items:
- ./configure
something in this style
Added Playbooks for installation system packages and building env.
TODO:
Reviewer:
@wolendranh