-
Notifications
You must be signed in to change notification settings - Fork 72
Running user agent against a local LEAP provider
Once you've setup the pixelated-user-agent and a local LEAP provider, you'll need to setup local certificates.
Side note: all commands are expecting you are inside the example-provider folder:
cd leap_platform/tests/example-provider
Be sure you have already configured your /etc/hosts
with the output provided by vagrant up
. If you haven't done that yet, you can grab the output of:
vagrant ssh -c "cd /home/vagrant/leap/configuration && leap compile hosts"
It should be something like:
## environment 'production'
172.28.128.3 node1 node1.example.org node1.example.org example.org api.example.org nicknym.example.org
This output should be appended to your /etc/hosts
file.
You'll need to copy the certificate created inside the vagrant box to somewhere accessible by your local pixelated-user-agent. We can use the /vagrant
folder for that, since it's a shared folder:
vagrant ssh -c "cp /home/vagrant/leap/configuration/files/ca/ca.crt /vagrant"
If you followed the Developer-Setup-on-native-OS, you'll need to activate the virtual environment manually:
source ~/.venvs/pixua/bin/activate
Now you can run the user agent against the local LEAP provider, passing the local certificate:
pixelated-user-agent --multi-user --provider=example.org -lc ca.crt
The LEAP provider will be available at https://example.org
and the pixelated-user-agent will be available at localhost:3333
.
- When you finished testing and developing, remember to
vagrant halt
your LEAP provider, so you can release the memory allocated by the vagrant box. - You can deactivate the pixelated-user-agent virtual environment by simple typing
deactivate
. - You might also want to remove the line added on your
/etc/hosts
file, so you can restore the system's default.