File: configs/config.ini
debug = True # Debug
username = 'root' # XenServer root username
password = '!QAZxsw2' # XenServer root password
url = 'http://10.10.10.18:80/' # XenServer API URL
database = 'vmemperor' # RethinkDB database name
host = '127.0.0.1' # RethinkDB host
vmemperor_host ="10.10.10.102" # Your host's IP as seen by VMs (for postinstall script URL)
vmemperor_port = 8889 # VMEmperor API port
authenticator = 'ispldap' # Authenticator class
#authenticator='ispldap'
#log_events = 'vm,vm_metrics,vm_appliance,vm_guest_metrics.sr,vdi'
ansible_pubkey = '~/.ssh/id_rsa.pub' # Public key exported during auto installation for Ansible
ansible_networks = ["920b8d47-9945-63d8-4b04-ad06c65d950a"] # Networks that your host and VMs all run on
user_source_delay = 2 # How often VMEmperor asks external authenticator for user and group lists, in seconds- Configure
login.ini. Leave the following options default:vmemperor_port(Dockerfile assumes auto configuration of frontend and it uses default port)host(Dockerfile assumes RethinkDB is running in the same Docker container)
- Pay attention to
ansible_pubkeyvariable: its default value assumes that you mount/rootdirectory with.ssh/id_rsaand.ssh/id_rsa.pubfiles in container. If you change this value, correctdocker runcommand accordingly - Adapt your Ansible playbooks, see example in
ansiblefolder. You may want to use them as volume - editdocker-compose.yml - Generate SSH keys for access using Ansible:
ssh-keygen -f keys/id_rsa
- Run
docker-compose up
-
Ensure at least Python 3.7 on your host machine
-
Set Up XenServer and provide XenServer URL as
urlconfig parameter -
Set up RethinkDB. Don't forget
bind=127.0.0.1 -
Install ansible in order to use automation benefits
-
Generate a SSH pubkey for ansible to use
-
Set up config parameters as shown in Example
-
Set up API URL for frontend: in
frontend/server/index.jsfind:const options = { target: 'http://localhost:8889',
around line 38 and replace it with
http://localhost:vmemperor_port(or another host if you plan to use frontend and backend on different hosts) -
Start RethinkDB
-
Install VMEmperor dependencies with
pip install -r requirements.txt(optionally create a virtualenv ). Install npm for managing frontend -
For
ispldapset up LDAP server IP inauth/ispldap.py:12, variableSERVER_IP -
Optionally Adapt your Ansible playbooks, see example in
ansiblefolder -
change your directory to
/backendand copy/configs/config.inito there. -
Start VMEmperor with
python3 vmemperor.py -
from
frontenddirectory install dependencies withnpm install -
run frontend with
npm run start