Steps to rise up a mirror of FruitBreedomics (FB) site
Please set your environment in order that scripts could work:
export DIGITALOCEAN_ACCESS_TOKEN=<your DO token>
Create a new droplet using:
$ python scripts/create_droplet.py
NB: time is needed to start-up a droplet and to add firewalls, volumes, etc. the script will exit if it can't perform a particoular action. Recall the script after the droplet is started to add additional configuration staff (the script make no changes if they currently applied on the droplet)
Set the current droplet IP address in hosts
file:
[fruitbreedomics]
centos7 ansible_host=fb.paolocozzi.cloud
$ ansible-playbook site.yml
The openvz_role
was inspired from here
Ensure a container is not present:
# vzlist -a 101
Container not found
create a new container with
$ vzctl create 100 --ostemplate centos-6-x86_64
$ vzctl set 100 --ipadd 192.168.0.100 --save
$ vzctl set 100 --nameserver 8.8.8.8 --save
$ vzctl set 100 --hostname server100.mydomain.com --save
Modify memory used:
$ vzctl set 109 --ram 1024M --save
Start the container and enter into it
$ vzctl start 100
$ vzctl enter 100
More info on basic operations could be found here and here. Info on OpenVZ. Info on container NAT Info on changing memory here and here Info on iptables
WARNING: Not applied! Info on DHCP and Virtual Ethernet device
$ vzdump --restore /mnt/fb_volume/fruitbreedomics/vzdump-openvz-109-2019_06_12-22_10_52.tar.gz 109
$ vzctl set 109 --netif_del eth0 --save
$ vzctl set 109 --ipadd 192.168.0.109 --save
$ vzctl start 109