Ansible Deploy server - JorgeFrancoIbanez/FlaskForm GitHub Wiki
In this section, I explain to setup your remote server using Ansible and some of the configurations used.
- I Deploy my server with Apache server, Mysql and UFW (Uncomplicated Firewall).
#How I made it
##Services
###Apache Some configurations files were called and copied into the server.
###Mysql A backup of the local database was imported(including the storage procedure needed by the Flask Application).
user: root (By default) passwd: MySQL_root_pass database_name: form table: data
###UFW The only two port available are:
+ Port 22 -> SSH
+ Port 80 -> TCP
##Deploy the server
To deploy your server you need to set the server IP into "/etc/ansible/hosts" as:
"/etc/ansible/hosts" :
[web]
IP_of_host ansible_ssh_private_key_file=~/path/to/private_key ansible_user=user_of_host_server
Change the IP inside "../ansible/conf/virthost.conf" for your own
<VirtualHost *:80>
ServerName **IP_of_host**
ServerAdmin [email protected]
.........
Finally call the deploy playbook:
ansible-playbook ../ansible/yaml/deploy.yml
If there are problems with the private key (no permissions) a possible solution is changing the key private permissions: $ sudo chmod 600