# Controller needs to be provisoned with the unique-id of the device(netopeer) and public key. # The way this is done with docker compose is: # 1. A new docker instance is spawned and public key is generated. # 2. We create new pair of keys to ensure it is different than the snapshot of the image. # 3. Execute script to send REST to provision netopeer unique-id + public key + credentials in controller. # 4. Start netopeer. netopeer: image: sdnhub/netopeer hostname: netopeer command: sh -c "apt-get update;apt-get install curl --force-yes -y;echo -e 'y/n' | ssh-keygen -q -N '' -f /etc/ssh/ssh_host_rsa_key;/root/whitelist_add.sh $${HOSTNAME};/root/credentials_set.sh -global root root;/root/netopeer/server/netopeer-server -v 3" environment: - controller_ip=ODL_SYSTEM_IP volumes: - ./datastore-server.xml:/usr/local/etc/netopeer/cfgnetopeer/datastore-server.xml - ./whitelist_add.sh:/root/whitelist_add.sh - ./credentials_set.sh:/root/credentials_set.sh