Skip to content
This repository has been archived by the owner on Jan 2, 2020. It is now read-only.

Running user agent against a local LEAP provider

Tulio Casagrande edited this page May 31, 2017 · 3 revisions

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

Configure host IP

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.

Setup local certificates

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"

Running user-agent with local certificates

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.

Restoring settings back

  • 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.