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_pubkey
variable: its default value assumes that you mount/root
directory with.ssh/id_rsa
and.ssh/id_rsa.pub
files in container. If you change this value, correctdocker run
command accordingly - Adapt your Ansible playbooks, see example in
ansible
folder. 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
url
config 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.js
find: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
ispldap
set up LDAP server IP inauth/ispldap.py:12
, variableSERVER_IP
-
Optionally Adapt your Ansible playbooks, see example in
ansible
folder -
change your directory to
/backend
and copy/configs/config.ini
to there. -
Start VMEmperor with
python3 vmemperor.py
-
from
frontend
directory install dependencies withnpm install
-
run frontend with
npm run start