How to install OSM in Amazon EC2

From OSM Public Wiki
Revision as of 10:49, 7 September 2018 by Almagia (talk | contribs) (Created page with "''These instructions are oriented to install OSM Release FOUR'' = Requirements = '''Resources:''' • MINIMUM: 2 CPUs, 4 GB RAM, 20GB disk and a single interface with Intern...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

These instructions are oriented to install OSM Release FOUR

Requirements

Resources: • MINIMUM: 2 CPUs, 4 GB RAM, 20GB disk and a single interface with Internet access • RECOMMENDED: 2 CPUs, 8 GB RAM, 40GB disk and a single interface with Internet access Instance Type/AMI: • Recommended Instance Type: m5.xlarge (https://aws.amazon.com/ec2/instance-types/) • Ubuntu 16.04 (64-bit variant required) as base AMI (http://releases.ubuntu.com/16.04/) • Ubuntu AMI’s: https://cloud-images.ubuntu.com/locator/ec2/ • Launching an EC2 instance: https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/EC2_GetStarted.html#ec2-launch-instance


The following installation steps assume that you already have an EC2 instance launched which meets the minimum requirements mentioned above.


OSM Installation

1. Install OSM and save installation logs to a file for troubleshooting if needed:

wget https://osm-download.etsi.org/ftp/osm-4.0-four/install_osm.sh
chmod +x install_osm.sh
./install_osm.sh 2>&1 | tee osm_install_log.txt

2. Answer the following dialog box questions accordingly:

  • The installation will configure LXD, install juju, install docker CE and init a docker swarm, as pre-requirements. Do you want to proceed (Y/n)? Y
  • Do you want to configure the LXD bridge? Yes
  • Do you want to setup an IPv4 subnet? Yes
  • << Default values apply for next questions >>
  • Do you want to setup an IPv6 subnet? No

3. Add the following environment variables to the end of your ‘.bashrc’ file and then source it with ‘source .bashrc’:

export OSM_HOSTNAME=127.0.0.1
export OSM_SOL005=True

4. You will notice 10 Docker Containers created on the EC2 instance. Check the status of the containers and Docker service:

docker stack ps osm |grep -i running
docker service ls

5. Create the AWS VIM Account (AWS Site)

NOTE: Make sure to select the region in which your EC2 instance resides.

osm vim-create --name aws-site --user <aws-access-key> --password <aws-secret-key> --auth_url  https://aws.amazon.com --tenant admin --account_type aws --config '{region_name: us-west-2, flavor_info: “{t2.nano: {cpus: 1, disk: 100, ram: 512}, t2.micro: {cpus: 1, disk: 100, ram: 1024}, t2.small: {cpus: 1, disk: 100, ram: 2048}, m1.small: {cpus: 1, disk: 160, ram: 1741}}”}'
 	        

6. Access the OSM Console via the EC2 Instance’s Private IP from another EC2 Instance in the same subnet:

NOTE: You can use a Windows instance to easily access the OSM Console. Launching an EC2 Windows Instance: https://docs.aws.amazon.com/AWSEC2/latest/WindowsGuide/EC2_GetStarted.html#ec2-launch-instance


http://1.2.3.4
username: admin
password: admin

7. Deploy/Test a network service by using any of the available VNF and NS packagers from ‘https://osm-download.etsi.org/ftp/osm-3.0-three/2nd-hackfest/packages/’:

wget https://osm-download.etsi.org/ftp/osm-3.0-three/2nd-hackfest/packages/hackfest_1alt_vnfd.tar.gz
wget https://osm-download.etsi.org/ftp/osm-3.0-three/2nd-hackfest/packages/hackfest_1alt_nsd.tar.gz
osm vnfd-create hackfest_1alt_vnfd.tar.gz

osm nsd-create hackfest_1alt_nsd.tar.gz
osm ns-create --ns_name hackfest1alt --nsd_name hackfest1alt-ns --vim_account aws-site
osm ns-list
osm ns-show hackfest1alt