1 description: Heat template that deploys PnP PNF simulator
2 heat_template_version: '2013-05-23'
4 PNF_PnP_simualtor_private_ip:
5 description: IP address of PNF_PnP_simualtor in private network
7 get_attr: [PNF_PnP_simualtor, first_address]
8 PNF_PnP_simualtor_public_ip:
9 description: Floating IP address of PNF_PnP_simualtor in public network
11 get_attr: [PNF_PnP_simualtor_public, floating_ip_address]
14 description: Type of instance (flavor) to be used
18 description: Ubuntu 16.04 image to be used
19 label: Image name or ID
22 description: Public/Private key pair name
26 description: Private network id
27 label: Private network name or ID
30 description: Private subnet id
31 label: Private subnetwork name or ID
34 description: Public network that enables remote connection to VNF
35 label: Public network name or ID
39 description: Security group to be used
40 label: Security Groups
49 description: Correlation ID
54 description: VES collector host ip
59 description: VES collector host port
66 get_param: flavor_name
73 get_resource: PNF_PnP_simualtor_port0
84 get_param: correlation_id
90 DOCKER_COMPOSE_VERSION=1.22.0
91 PROTOBUF_VERSION=3.6.1
95 sed -i 's/PermitRootLogin.*/PermitRootLogin yes/' /etc/ssh/sshd_config
96 sed -i 's/PasswordAuthentication.*/PasswordAuthentication yes/' /etc/ssh/sshd_config
98 echo -e "onap\nonap" | passwd root
102 rm -rf /var/lib/apt/lists/*
107 docker_install_and_configure () {
108 curl "https://releases.rancher.com/install-docker/$DOCKER_VERSION.sh" | sh
109 mkdir -p /etc/systemd/system/docker.service.d/
110 cat > /etc/systemd/system/docker.service.d/docker.conf << EOF
113 ExecStart=/usr/bin/dockerd -H fd:// --insecure-registry=nexus3.onap.org:10003
114 Environment="HTTP_PROXY=$proxy"
115 Environment="HTTPS_PROXY=$proxy"
117 systemctl daemon-reload
118 systemctl restart docker
119 apt-mark hold docker-ce
120 docker login -u docker -p docker nexus3.onap.org:10003
123 docker_compose_install () {
124 curl -L "https://github.com/docker/compose/releases/download/$DOCKER_COMPOSE_VERSION/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
125 chmod +x /usr/local/bin/docker-compose
128 pnf_sim_file_checkout () {
129 cd /root; git clone https://gerrit.onap.org/r/integration
130 printf "{\n \"simulatorParams\": {\n \"vesServerUrl\": \"http://$VES-HOST:$VES-PORT/eventListener/v7\",\n \"testDuration\": \"10\",\n \"messageInterval\": \"1\"\n },\n \"commonEventHeaderParams\": {\n \"eventName\": \"pnfRegistration_Nokia_5gDu\",\n \"nfNamingCode\": \"gNB\",\n \"nfcNamingCode\": \"oam\",\n \"sourceName\": \"$correlation_id\",\n \"sourceId\": \"val13\",\n \"reportingEntityName\": \"NOK6061ZW3\"\n },\n \"pnfRegistrationParams\": {\n \"serialNumber\": \"6061ZW3\",\n \"vendorName\": \"Nokia\",\n \"oamV4IpAddress\": \"val3\",\n \"oamV6IpAddress\": \"val4\",\n \"unitFamily\": \"BBU\",\n \"modelNumber\": \"val6\",\n \"softwareVersion\": \"val7\",\n \"unitType\": \"val8\"\n }\n}" > integration/test/mocks/pnfsimulator/config/config.json
134 docker login -u docker -p docker nexus3.onap.org:10003
135 cd ~/integration/test/mocks/pnfsimulator
142 docker_install_and_configure
143 docker_compose_install
144 pnf_sim_file_checkout
147 type: OS::Nova::Server
148 PNF_PnP_simualtor_port0:
152 get_param: private_subnet_id
154 get_param: private_net_id
156 - get_param: security_group
157 type: OS::Neutron::Port
158 PNF_PnP_simualtor_public:
161 get_param: public_net_id
163 get_resource: PNF_PnP_simualtor_port0
164 type: OS::Neutron::FloatingIP