From dcccf6e2c90ef7b079ac6a4f6258b7d550fa79c5 Mon Sep 17 00:00:00 2001 From: Eli Halych Date: Tue, 24 Nov 2020 09:59:07 +0000 Subject: Change mass-pnf-sim folder name to masspnfsim Details: - Allows for importing python files/classes/methods via normal import. - Dashes in mass-pnf-sim prevented from a normal Python import. - mass-pnf-sim path referenced in the project files changed to masspnfsim. - Possibility of using masspnfsim as a git submodule that requires noraml import. Issue-ID: INT-1789 Signed-off-by: Eli Halych Change-Id: I00cd753181c9b240b99881057cf777cf7977387a --- test/mocks/mass-pnf-sim/deployment/heat/README.rst | 58 ------------ .../mass-pnf-sim/deployment/heat/cloud-config.yaml | 30 ------ test/mocks/mass-pnf-sim/deployment/heat/heat.env | 10 -- test/mocks/mass-pnf-sim/deployment/heat/heat.yaml | 103 --------------------- .../deployment/heat/mass-pnf-sim_run.sh | 11 --- 5 files changed, 212 deletions(-) delete mode 100644 test/mocks/mass-pnf-sim/deployment/heat/README.rst delete mode 100644 test/mocks/mass-pnf-sim/deployment/heat/cloud-config.yaml delete mode 100644 test/mocks/mass-pnf-sim/deployment/heat/heat.env delete mode 100644 test/mocks/mass-pnf-sim/deployment/heat/heat.yaml delete mode 100644 test/mocks/mass-pnf-sim/deployment/heat/mass-pnf-sim_run.sh (limited to 'test/mocks/mass-pnf-sim/deployment/heat') diff --git a/test/mocks/mass-pnf-sim/deployment/heat/README.rst b/test/mocks/mass-pnf-sim/deployment/heat/README.rst deleted file mode 100644 index 0c688aecd..000000000 --- a/test/mocks/mass-pnf-sim/deployment/heat/README.rst +++ /dev/null @@ -1,58 +0,0 @@ ----------------------------------------------- -Heat template for deploying Mass PNF Simulator ----------------------------------------------- - -About -===== - -This directory contains the setup that allows the deploy of Mass PNF Simulator to an OpenStack cloud instance. After successful VM run a predefined number of PNF instances will be spawned on it and VES event sending will be triggered. - -Prerequisites -============= - -1) In order to instantiate the VM with the simulator a running OpenStack infrastructure is needed with HOT (Heat Orchestration Template) support and a preconfigured floating ip network for accessing the instance. - -2) An Ubuntu 18.04 image is required to boot the instance. It may also work on 16.04 or newer images albeit the setup was only validated on Ubuntu Bionic. - -3) A running instance of ONAP with VES Collector is required only if it's desired to send the PM events from simulator to a real collector instance. In other case any arbitrary mockup service e.g. *netcat* can be used to listen to the events. In either case a valid http link is required. - -Configuration -============= - -Prior running the Heat template *heat.env* needs to be filled with appropriate parameters: - -**image_name: ubuntu-18.04-server-cloudimg-amd64** - Name of the image for the instance. See remarks above concerning validated setup. - -**flavor_name:** - Flavor name should depend on the number of simulator instances required. Tests show that a setup with 50 PNF simulator instances require approximately 16GB of RAM - -**key_name:** - Name of the existing key for passwordless login - -**instance_net_id:** - Id of the tenant network for instance - -**float_net_id:** - Id of the public network with floating IPs - -**simulator_instances:** - Requested number of PNF simulator instances to run on the VM - -**ves_url:** - A http link to the VES Collector's event listener. Can be any arbitrary mock service that will merely receive the events for debugging purposes. - -**ftp_user:** - A username for the ftp service exposed by the running setup that serves the PM files - -**ftp_password:** - A password for the ftp service - -Running -======= - -To instantiate the Heat template run from *openstack* CLI: - -:: - - stack create -t integration/test/mocks/mass-pnf-sim/deployment/heat/heat.yaml -e integration/test/mocks/mass-pnf-sim/deployment/heat/heat.env diff --git a/test/mocks/mass-pnf-sim/deployment/heat/cloud-config.yaml b/test/mocks/mass-pnf-sim/deployment/heat/cloud-config.yaml deleted file mode 100644 index 8203a8470..000000000 --- a/test/mocks/mass-pnf-sim/deployment/heat/cloud-config.yaml +++ /dev/null @@ -1,30 +0,0 @@ -#cloud-config -package_upgrade: true -packages: - - apt-transport-https - - ca-certificates - - gnupg-agent - - software-properties-common - - docker-ce - - docker-ce-cli - - containerd.io - - docker-compose - - python3-virtualenv - - python3-pip - - maven - - openjdk-8-jdk-headless -# Docker's apt key needs to be injected early in the boot as 'apt' cloud-init -# module doesn't support configuring key from file -bootcmd: - - [curl, "https://download.docker.com/linux/ubuntu/gpg", -o, /run/docker.key] - - [apt-key, add, /run/docker.key] -apt: - sources: - docker: - source: "deb [arch=amd64] https://download.docker.com/linux/ubuntu $RELEASE stable" -runcmd: - - [pip3, install, tox] - - [mkdir, /root/.m2] - - [curl, "https://git.onap.org/oparent/plain/settings.xml", -o, /root/.m2/settings.xml] - - [update-java-alternatives, -s, java-1.8.0-openjdk-amd64] - - [bash, /root/mass-pnf-sim_run.sh] diff --git a/test/mocks/mass-pnf-sim/deployment/heat/heat.env b/test/mocks/mass-pnf-sim/deployment/heat/heat.env deleted file mode 100644 index 3e402fe49..000000000 --- a/test/mocks/mass-pnf-sim/deployment/heat/heat.env +++ /dev/null @@ -1,10 +0,0 @@ -parameters: - image_name: ubuntu-18.04-server-cloudimg-amd64 - flavor_name: m1.medium - key_name: - instance_net_id: - float_net_id: - simulator_instances: - ves_url: - ftp_user: - ftp_password: diff --git a/test/mocks/mass-pnf-sim/deployment/heat/heat.yaml b/test/mocks/mass-pnf-sim/deployment/heat/heat.yaml deleted file mode 100644 index 9718c5c68..000000000 --- a/test/mocks/mass-pnf-sim/deployment/heat/heat.yaml +++ /dev/null @@ -1,103 +0,0 @@ -description: Heat template for deploying Mass PNF Simulator -heat_template_version: '2017-02-24' -parameters: - flavor_name: - description: Flavor name of the simulator instance. This should depend on the requested amount of simulator instances - type: string - image_name: - description: Name or id of the image (Debian family only) - type: string - key_name: - label: Key pair name for passwordless login to instance - type: string - float_net_id: - description: ID of the network with a pool of floating IPs - label: Floating IP network - type: string - instance_net_id: - type: string - description: Id of a private network for instance interface - simulator_instances: - type: number - description: Number of simulator instances to run on cloud instance - ves_url: - type: string - description: VES Collector url - ftp_user: - type: string - description: Username for the ftp server - ftp_password: - type: string - description: Password for the ftp server -resources: - config: - type: OS::Heat::SoftwareConfig - properties: - config: - get_file: cloud-config.yaml - sim_script: - type: OS::Heat::SoftwareConfig - properties: - config: - str_replace: - template: - get_file: mass-pnf-sim_run.sh - params: - $SIMULATOR_INSTANCES: { get_param: simulator_instances } - $VES_URL: { get_param: ves_url } - $FILE_SERVER: { get_attr: [simulator_floating_ip, floating_ip_address] } - $FTP_USER: { get_param: ftp_user } - $FTP_PASSWORD: { get_param: ftp_password } - sim_script_file: - type: OS::Heat::CloudConfig - properties: - cloud_config: - write_files: - - path: /root/mass-pnf-sim_run.sh - content: - get_attr: [sim_script, config] - simulator_port: - type: OS::Neutron::Port - properties: - network: - get_param: instance_net_id - simulator_floating_ip: - type: OS::Neutron::FloatingIP - properties: - floating_network: - get_param: float_net_id - port_id: - get_resource: simulator_port - cloud_config: - type: OS::Heat::MultipartMime - properties: - parts: - - config: - get_resource: config - - config: - get_resource: sim_script_file - simulator: - type: OS::Nova::Server - properties: - name: mass-pnf-simulator - key_name: - get_param: key_name - image: - get_param: image_name - flavor: - get_param: flavor_name - networks: - - port: - get_resource: simulator_port - user_data_format: RAW - user_data: - get_resource: cloud_config -outputs: - simulator_instance_id: - description: ID of the simulator instance - value: - get_resource: simulator - simulator_instance_fip: - description: Floating IP address of the simulator instance - value: - get_attr: [simulator_floating_ip, floating_ip_address] diff --git a/test/mocks/mass-pnf-sim/deployment/heat/mass-pnf-sim_run.sh b/test/mocks/mass-pnf-sim/deployment/heat/mass-pnf-sim_run.sh deleted file mode 100644 index 20880003a..000000000 --- a/test/mocks/mass-pnf-sim/deployment/heat/mass-pnf-sim_run.sh +++ /dev/null @@ -1,11 +0,0 @@ -#!/bin/bash -pushd /root -git clone https://git.onap.org/integration -pushd integration/test/mocks/mass-pnf-sim -./setup.sh -source .tox/MassPnfSim-runtime/bin/activate -./mass-pnf-sim.py build -./mass-pnf-sim.py bootstrap --count $SIMULATOR_INSTANCES --urlves $VES_URL --ipfileserver $FILE_SERVER --typefileserver ftps --ipstart 10.11.0.16 --user $FTP_USER --password $FTP_PASSWORD -./mass-pnf-sim.py start -sleep 30 -./mass-pnf-sim.py trigger -- cgit 1.2.3-korg