...
PnP PNF simulator installation
Put the following bash script on the server and run it :
Code Block language bash #!/bin/bash set_versions () { DOCKER_VERSION=17.12.1.ce-1.fc27 DOCKER_COMPOSE_VERSION=1.22.0 } enable_root_ssh () { sed -i 's/PermitRootLogin.*/PermitRootLogin yes/' /etc/ssh/sshd_config sed -i 's/PasswordAuthentication.*/PasswordAuthentication yes/' /etc/ssh/sshd_config service sshd restart echo -e "arthur\narthur" | passwd root } update_os () { dnf -y install fedora-upgrade } docker_install_configure () { dnf -y remove docker \ docker-client \ docker-client-latest \ docker-common \ docker-latest \ docker-latest-logrotate \ docker-logrotate \ docker-selinux \ docker-engine-selinux \ docker-engine dnf -y install dnf-plugins-core dnf config-manager \ --add-repo \ https://download.docker.com/linux/fedora/docker-ce.repo dnf -y install docker-ce-$DOCKER_VERSION systemctl start docker mkdir -p /etc/systemd/system/docker.service.d/ cat > /etc/systemd/system/docker.service.d/override.confg<< EOF [Service] Environment="http_proxy=http://10.144.1.10:8080/" Environment="https_proxy=http://10.144.1.10:8080/" Environment="no_proxy=10.157.167.132,127.0.0.1,localhost,.noklab.net,.int.net.nokia.com,.ext.net.nokia.com,.int.nokia.com,.nsn-rdnet.com,.nsn-net.net,.inside.nokiasiemensnetworks.com,.access.nokiasiemensnetworks.com,.nsn-intra.net,.inside.nsn.com,.access.nsn.com" EOF systemctl daemon-reload systemctl restart docker docker login -u docker -p docker nexus3.onap.org:10003 } docker_compose_install () { curl -L https://github.com/docker/compose/releases/download/$DOCKER_COMPOSE_VERSION/docker-compose-$(uname -s)-$(uname -m) -o /usr/local/bin/docker-compose chmod +x /usr/local/bin/docker-compose } pnf_sim_file_checkout () { mkdir ~/sim/ mkdir ~/sim/config cd ~/sim/config/;wget "https://gerrit.onap.org/r/gitweb?p=integration.git;a=blob_plain;f=test/mocks/pnfsimulator/config/config.json;hb=HEAD" -O config.json cd ~/sim/config/;wget "https://gerrit.onap.org/r/gitweb?p=integration.git;a=blob_plain;f=test/mocks/pnfsimulator/config/netconf.env;hb=HEAD" -O netconf.env mkdir ~/sim/json_schema cd ~/sim/config/;wget "https://gerrit.onap.org/r/gitweb?p=integration.git;a=blob_plain;f=test/mocks/pnfsimulator/json_schema/input_validator.json;hb=HEAD" -O input_validator.json cd ~/sim/config/;wget "https://gerrit.onap.org/r/gitweb?p=integration.git;a=blob_plain;f=test/mocks/pnfsimulator/json_schema/output_validator.json;hb=HEAD" -O output_validator.json mkdir ~/sim/netconf cd ~/sim/netconf/;wget "https://gerrit.onap.org/r/gitweb?p=integration.git;a=blob_plain;f=test/mocks/pnfsimulator/netconf/pnf-simulator.data.xml;hb=HEAD" -O pnf-simulator.data.xml cd ~/sim/netconf/;wget "https://gerrit.onap.org/r/gitweb?p=integration.git;a=blob_plain;f=test/mocks/pnfsimulator/netconf/pnf-simulator.yang;hb=HEAD" -O pnf-simulator.yang cd ~/sim/;wget "https://gerrit.onap.org/r/gitweb?p=integration.git;a=blob_plain;f=test/mocks/pnfsimulator/docker-compose.yml;hb=HEAD" -O docker-compose.yml cd ~/sim/;wget "https://gerrit.onap.org/r/gitweb?p=integration.git;a=blob_plain;f=test/mocks/pnfsimulator/simulator.sh;hb=HEAD" -O simulator.sh chmod 654 ~/sim/simulator.sh } start_simulator (){ ~/sim/simulator.sh start } set_versions enable_root_ssh update_os docker_install_configure docker_compose_install pnf_sim_file_checkout start_simulator
- Verify that all docker containers are up :
root@marekpl-rtpmsim:~# docker ps -a CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES ac1f97c91fbb nexus3.onap.org:10003/onap/ves-hv-collector-xnf-simulator "./run-java.sh run..." 2 minutes ago Up 28 seconds 0.0.0.0:6062->6062/tcp hv-ves_xnf-simulator_1 c9fccf31d8ac nexus3.onap.org:10003/onap/ves-hv-collector:latest "./run-java.sh run..." 2 minutes ago Up 27 seconds (healthy) 0.0.0.0:6060-6061->6060-6061/tcp hv-ves_ves-hv-collector_1 dfb445680eda wurstmeister/kafka "start-kafka.sh" 2 minutes ago Up 26 seconds 0.0.0.0:9092->9092/tcp hv-ves_kafka_1 b316f34ed9e0 wurstmeister/zookeeper "/bin/sh -c '/usr/..." 2 minutes ago Up 20 seconds 22/tcp, 2888/tcp, 3888/tcp, 0.0.0.0:2181->2181/tcp hv-ves_zookeeper_1 586cb4b9dd9f progrium/consul "/bin/start -serve..." 2 minutes ago Up 30 seconds 53/tcp, 53/udp, 8300-8302/tcp, 8400/tcp, 8301-8302/udp, 0.0.0.0:8500->8500/tcp hv-ves_consul_1 root@marekpl-rtpmsim:~#
- Verify that all docker containers are up :
PnP PNF simulator usage
#!/bin/bash
set_versions () {
DOCKER_VERSION=17.12.1.ce-1.fc27
DOCKER_COMPOSE_VERSION=1.22.0
}
enable_root_ssh () {
sed -i 's/PermitRootLogin.*/PermitRootLogin yes/' /etc/ssh/sshd_config
sed -i 's/PasswordAuthentication.*/PasswordAuthentication yes/' /etc/ssh/sshd_config
service sshd restart
echo -e "arthur\narthur" | passwd root
}
update_os () {
dnf -y install fedora-upgrade
}
docker_install_configure () {
dnf -y remove docker \
docker-client \
docker-client-latest \
docker-common \
docker-latest \
docker-latest-logrotate \
docker-logrotate \
docker-selinux \
docker-engine-selinux \
docker-engine
dnf -y install dnf-plugins-core
dnf config-manager \
--add-repo \
https://download.docker.com/linux/fedora/docker-ce.repo
dnf -y install docker-ce-$DOCKER_VERSION
systemctl start docker
mkdir -p /etc/systemd/system/docker.service.d/
cat > /etc/systemd/system/docker.service.d/override.confg<< EOF
[Service]
Environment="http_proxy=http://10.144.1.10:8080/"
Environment="https_proxy=http://10.144.1.10:8080/"
Environment="no_proxy=10.157.167.132,127.0.0.1,localhost,.noklab.net,.int.net.nokia.com,.ext.net.nokia.com,.int.nokia.com,.nsn-rdnet.com,.nsn-net.net,.inside.nokiasiemensnetworks.com,.access.nokiasiemensnetworks.com,.nsn-intra.net,.inside.nsn.com,.access.nsn.com"
EOF
systemctl daemon-reload
systemctl restart docker
docker login -u docker -p docker nexus3.onap.org:10003
}
docker_compose_install () {