AWS EC2 Installation¶
An AWS EC2 configuration example is shown in the figure below. We offer an Ansible script for quick and easy AWS installation. Further below are the installation instructions.
The Ansible script described below can be executed from any Linux machine that has access to your AWS account. Once ran, the script will create a flexiWAN instance on your AWS account. Please note that the script will not install flexiWAN on the device you’re running it from, it will create a new instances on AWS.
Before starting the installation process, make sure you have the following things:
An Amazon EC2 account for installing the flexiEdge device
An Ansible environment on your Linux machine.
If you are running under Linux Ubuntu 18.04 you can install it by:
sudo apt update sudo apt install software-properties-common sudo apt-add-repository ppa:ansible/ansible sudo apt update sudo apt install ansible python-boto3 python3-boto3 python-boto python3-boto
A valid AWS_ACCESS_KEY and AWS_SECRET_ACCESS_KEY.
The keys can be found in the IAM management console of Amazon EC2. More information on how to find and update the access keys is detailed here
Download the Ansible script
mkdir ansible cd ansible wget https://sandbox.flexiwan.com/Utils/ansible.v0.1.3.tar.gz
Unzip the tar.gz:
tar -vxf ansible.v0.1.3.tar.gz cd ansible.v0.1.3/
Export the AWS_ACCESS_KEY and AWS_SECRET_ACCESS_KEY
export AWS_ACCESS_KEY=********************** export AWS_SECRET_ACCESS_KEY=***********************************************
Run the Ansible script to create your AWS flexiEdge device
Use the following parameters in the script command line:
Region in Amazon EC2 used for creating the flexiEdge device
A string for naming the VPC
The CIDR for the VPC. Note: This should be a globally unique CIDR, as our goal is to create a tunnel between VPCs
The CIDR for the LAN network
The LAN IP address
The organization token created in your flexiManage account
A sting for tagging the resource in EC2
Example: the following command creates a VPC in Ohio region (us-east-2), the LAN and WAN subnets, the Internet Gateway and one m5.large EC2 instance with Ubuntu 18.04 and the flexiEdge software (as shown in the figure above). Once the script completes successfully, a new flexiEdge device should appear in the flexiManage Devices menu automatically. The SSH key to access the EC2 instance is saved in the directory under the string name used for the stack parameter.
ansible-playbook ec2_create_customer.yml --extra-vars "region=us-east-2 vpc_name=VPC vpc_cidr_block=172.18.0.0/16 cidr_lan=172.18.1.0/24 cidr_wan=172.18.254.0/24 lan_ip_address=172.18.1.254 flexiwan_token=ey****** stack=Ohio"
To access the instance via SSH
SSH with your key, and the public IP allocated for the flexiEdge device
ssh -i Ohio -l ubuntu 18.104.22.168