Deploy Cloud Exchange on a Virtual Machine
Deploy Cloud Exchange on a Virtual Machine
Think of Cloud Exchange as a ready-to-use VM based on Ubuntu 20.04, and already set up with all prerequisites of Cloud Exchange (like Docker, Python, Docker Compose, Zip). As easy to set up and start using Cloud Exchange as before, it is available for major cloud platforms (AWS, Azure, and GCP), as well as for on-premises deployment platforms (VMware ESXi).
Support Matrix
Platform | Cloud Exchange Version | Deployment Format |
---|---|---|
VMware ESXi | 5.0.1 | OVA |
AWS | 5.0.1 | AMI |
Azure | 5.0.1 | Azure image |
GCP | 5.0.1 | GCP image |
Sizing Matrix
Size | EPM | CPU/RAM (GB) | Disk Space (GB) | AWS Equivalent | Azure Equivalent | GCP Equivalent |
---|---|---|---|---|---|---|
Medium | 100k | 8/16 | 80 | C62XL | F8s_v2 | E2 Series (select custom CPU and RAM) |
Large | 200k | 16/32 | 120 | C64XL | F16s_v2 | E2 Series (select custom CPU and RAM) |
Note
You will need to change disk size while creating new instances.
Note for OS Update
- Admins CANNOT update the underlying Ubuntu OS when CE is deployed using OVA.
- Admins SHOULD NOT update the underlying the Ubuntu OS when CE is deployed on AMI (AWS) OR VHDX (Azure).
- Admins SHOULD redeploy CE in the event of functionality/stability issues due to unintentional update of Ubuntu OS for CE as a VM deployment on AWS and Azure.
Deployment Options
VMware ESXi OVA
Prerequisites
- ESXi 6.7 or later.
- Minimum 8 CPUs and 16 GB RAM available in ESXi.
- Minimum 152 GB of free disk space.
- Download the Latest 5.0.1 OVA file from here.
Click play to watch a video.
Configure the OVA
- Log in to your vSphere Client.
- Select VMs and Templates from the menu.
- Select the Datacenter where you want to deploy Cloud Exchange.
- Right-click on the Datacenter and click Deploy OVF Template.
- Deploy the OVF Template wizard.
- Select the OVF template. Select Local file, upload the latest OVA file, and then click Next.
- Select a name and folder, and then click Next. Enter the virtual machine name and select the location for virtual machine.
- Select a compute resource and then click Next.
- Review the details and click Next.
- Select a Storage that has a minimum of 150 GB of free disk space available and click Next.
- Select networks and click Next.
- When you’re ready to complete, click Finish.
- Wait for the import task to be finished.
- Select the Deployed VM and click Edit Settings.
- Change the CPU and Memory of the VM according to your profile requirements and click OK (for a medium profile, 8 CPU and 16 GB RAM are required).
- Power on the VM.
- Launch the web console after powering on the VM.
- Wait for the login prompt, and log in using the following these credentials. Change the password with a more secure string.
Username: cteadmin
Password : Cl0ud3xc4ang3! - If your network has DHCP enabled the VM will get its IP assigned. Run the following command $ ip addr to verify whether ip is assigned to the eth0 interface or not. If IP is not assigned automatically, reach out to your IT administrator and follow these steps (or How to assign static IP using netplan).
- Edit the file netskope_netplan_sample.yaml under /home/cteadmin.
$ vi /home/cteadmin/netskope_netplan_sample.yaml
- In the file, add the IP address that you want to assign, and then save the file. (Please check with the IT System Administrator for the IP address.)
- Now, copy the yaml file inside /etc/netplan:
$ cp /home/cteadmin/netskope_netplan_sample.yaml /etc/netplan
- Restart network service before applying the netplan changes.
$ sudo systemctl restart systemd-networkd
- Now, apply and assign the IP address:
$ sudo netplan apply
- Validate that IP address is assigned using the following command:
$ ip addr
- Edit the file netskope_netplan_sample.yaml under /home/cteadmin.
- After the IP is assigned, set up CE using one of these options:
- For standalone installation of Cloud Exchange, use these commands:
$ cd /opt/cloudexchange/cloudexchange $ sudo ./setup
Complete the setup.
$ sudo ./start
- For HA installation of Cloud Exchange, follow the HA installation guidelines.
- For standalone installation of Cloud Exchange, use these commands:
- Wait for 5-10 minutes and then access the CE using the IP address of VM.
Security Guidelines
- We recommend changing the password of the VM to a super secure password and remember it for future login to Virtual machine. If the new password is forgotten then there is no way to recover the VM.
- Restrict SSH access to specific IP addresses. Please consult with your IT team for the same.
Increase the Size of Disk/Volume (Optional)
The following these steps will only increase the disk/volume size. After performing these steps, follow Extend File system to new size of Disk/Volume (Optional) to increase the file system size.
- Select the VM in which you want to increase disk space.
- Power Off the virtual machine.
- Click Edit Settings.
- Change the Hard disk 1 size as per your requirements and click OK.
- Power On the VM.
- After the machine starts, follow the Extend File system to new size of Disk/Volume (Optional).
Azure
Prerequisites
- Azure account with necessary rights to create virtual machines.
Click play to watch a video.
Configure the Azure Virtual Machine
- Log in to Azure portal.
- Search for Virtual Machine and open it.
- Click Create and then Azure virtual machine.
- Create a virtual machine.
- Select your Subscription and Resource group where you want to create Virtual Machine.
- Select the Size of the machine according to your requirements (i.e medium, large).
- Click See all images.
- Search for and select Netskope Cloud Exchange in Marketplace, and then select the 5.0.1 image published by Netskope.
- Change the Size of the machine according to your requirement.
- Configure an Administrator account.
- Select SSH public key as Authentication type.
- Configure the following username and Generate new key pair. Username : cteadmin.
- Configure Inbound port rules: allow HTTPS and SSH.
- Select License Type as Other.
- Click Next > Disks and change the OS disk size per your requirements.
- (Optional) Configure the Network and remaining steps as per your organization policy.
- Click Review + create.
- Once validation is successful, click Create.
- Wait for the Virtual Machine to be created (it will take around 2-5 minutes)
- Once the Virtual Machine is started, SSH into machine with cteadmin username with private key.
- If you’re using Mac or Linux based operating system you will need to change pem file permissions to readonly.
chmod 400 <private-key-path>
-
ssh -i <private-key-path> cteadmin@ip-address-of-vm
- Run following commands to configure Cloud Exchange.
$ cd /opt/cloudexchange/cloudexchange $ sudo ./setup
Complete the setup.
- The maintenance and JWT Secret passwords are used internally within Cloud Exchange for database authentication.
- Special characters (including, but not limited to “#”, “$”, “/”, etc.) are not supported when setting the maintenance password for CE. Some of the processes do not work and will cause system failures if you use special characters.
- Only use alphanumeric values for the maintenance and JWT token passwords.
$ sudo ./start
- Wait for 5-10 minutes and then access the Cloud Exchange using the IP address of VM.
Security Guidelines
- Restrict ssh access to specific IP addresses from Networking tab of Virtual Machine
- We recommend using “SSH public key” as a machine Authentication type.
Increase Disk Size (Optional)
- Log in to Azure portal and open Virtual Machine.
- Stop the virtual machine if it’s running, and wait until the status becomes Stopped (deallocated), and then click Disk on the left navigation menu.
- Open OS disk.
- Click Size + performance and enter Custom disk size (GB) with the new disk size, and then click Save. You cannot decrease the size of the disk once it’s increased.
- Start the virtual machine.
- To verify the disk change, run this command to verify the disk size change after doing SSH into instance.
$ df -h /
- If you’re using Mac or Linux based operating system you will need to change pem file permissions to readonly.
AWS
Prerequisites
- An AWS account.
Click play to watch a video.
Configure the EC2 Instance
- Log in to your AWS account.
- Open EC2 service in your preferred region.
- Click Launch Instance.
- Enter name for this new instance and click Browse more AMIs.
- Search for Netskope Cloud Exchange and click AWS Marketplace AMIs, and then select Netskope Cloud Exchange AMI.
- Click Subscribe now.
- Select the Instance Type according to your requirements.
- Click Create new key pair and save the private key securely. This key will be required to access the machine.
- Change the Network Settings and allow SSH traffic according to your organization policy. We recommend to change and allow from your IP only. This applies the same for HTTPS port as well.
- Configure the storage as per your requirements.
- Click Launch Instance.
- After the machine is started, follow the below steps to configure CE.
- Copy the Public IPv4 DNS and run ssh command as follows:
- If you’re using Mac or Linux based operating system you will need to change pem file permissions to readonly.
chmod 400 <private-key-path>
-
ssh -i <private-key-path> cteadmin@public-ipv4-dns
- If you’re using Mac or Linux based operating system you will need to change pem file permissions to readonly.
- Enter these commands to setup CE:
$ cd /opt/cloudexchange/cloudexchange/ $ sudo ./setup
Complete the setup.
$ sudo ./start
- Wait for few mins for the CE to be started.
- Now open the IP public-ipv4-dns with the https protocol in a browser and start using CE.
Security Guidelines
- Restrict ssh access to specific IP addresses only.
Increase Size of Disk/Volume (Optional)
Following these steps will only increase the disk/volume size. After performing the steps follow Extend File system to new size of Disk/Volume (Optional) to increase the file system size.
- Log in to AWS and open the EC2 instance for which you want to increase the size of the disk and stop the machine if it’s running.
- Click Storage and then open the volume by clicking Volume ID.
- Select the volume and click Modify volume on the Actions menu.
- Change Size (GB) to the new disk size you want click Modify.
- Click Modify again on the confirmation popup.
- Wait for 8-10 minutes, start the EC2 instance and SSH into the VM.
- Now follow Extend a Linux file system after resizing a volume – Amazon Elastic Compute Cloud.
GCP
Create a Server in GCP
- Log in to your GCP account and go to Compute Engine. If you don’t see that on your main GCP dashboard you can search for Compute Engine.
- Click on CREATE INSTANCE
- Give your new instance a name, select Region, Zone and Machine configuration as per requirement.
- Select Machine type as per your profile requirements by clicking on “CUSTOM” (like 8 CPU and 16GB RAM for a medium profile).
To help you decide on size, check out our Sizing the System section here: https://docs.netskope.com/en/cloud-exchange-system-requirements.html
- Scroll down to “Boot disk” section and click on “Change.
- Select Ubuntu in Operating system and select Ubuntu 20.04 LTS in Version. Select “Boot disk type” and “Size” (like 80 GB Free Disk space for medium profile) as per your organization recommendation and click on “SELECT”.
To help you decide on size, check out our Sizing the System section here: https://docs.netskope.com/en/cloud-exchange-system-requirements.html
- Scroll down to “Firewall” and select “Allow HTTPS traffic.
- Scroll down to “Advanced options” and select the unfold icon
- Scroll down to Network interfaces, select Network and Subnetwork based on your requirements.
- Click on “CREATE.
- SSH into an Instance. Click SSH.
Now set up Cloud Exchange on your new GCP instance by following these instructions: Install Cloud Exchange on Ubuntu.
Create a GCP Image from an OVA File
Prerequisites
A GCP account with following permissions:
- Storage Admin
- Compute Admin
- Enable Cloud Build API for your project. Ref : Cloud Build API.
To create an image from an OVF file:
- Log in to GCP and select the project in which you want to create the GCP image.
- Create a new Cloud Storage named cloud-exchange-bucket by following these instructions: Create a new bucket.
- Download the latest version of Cloud Exchange OVA file from here and upload it to the cloud-exchange-bucket bucket by following these instructions: Uploading an object.
- Open Images under Compute Engine. Search for and select Images.
- Click Create Image.
- Enter cloud-exchange-5-0-1 in the Name field, and then select Virtual disk (VMDK, VHD) as the Source.
- Click Browse and select the uploaded OVA file from the cloud-exchange-bucket, and then select Ubuntu 20.04 Focal Fossa as the Operating system on virtual disk.
- Enter ubuntu-2004 as the Family and click Create.
- Wait for the image to be created; it takes around 25-30 minutes.
- After the image is created, you can start creating Compute machines from it.
Deploy the VM Instance
- Log in to the GCP account and open the Project where you want to deploy Cloud Exchange.
- Search for Compute Engine, click VM instances, and then Create Instance.
- Enter name of the instance and select a Region and Zone.
- Select the Machine configuration and Machine type as per your profile requirements by clicking Custom (like 8 CPU and 16 GB RAM for medium profile).
- Scroll down to the Boot disk section and click Change.
- Click Custom images, search for cloud-exchange-5-0-1, and then select the image.
- Select a Boot disk type as per your organization’s requirements, and then click Select.
- Scroll down to Firewall, select Allow HTTPS traffic, and then click Create.
- Wait for the machine to start. After the machine is started, continue to the next step to configure CE.
- Copy the Public IPv4, and run this ssh command from your machine’s terminal, or from putty:
$ ssh cteadmin@public-ipv4
- Enter this password:
Cl0ud3xc4ang3!
- The first time you login, you will be asked to change the password of the cteadmin user. Change the password to a super secure string, and keep it safe for later access to machine.
- Now log in to EC2 with new password.
- Use these commands to setup CE.
- For a standalone installation of Cloud Exchange, use these commands:
$ cd /opt/cloudexchange/cloudexchange $ sudo ./setup
Complete the setup.
$ sudo ./start
Now wait for few minutes for CE to be started.
- For an HA installation of Cloud Exchange, follow the HA installation instructions.
- For a standalone installation of Cloud Exchange, use these commands:
- Now open the IP public-ipv4-dns with the HTTPS protocol in a browser to start using CE.
Security Guidelines
Restrict ssh access to specific IP addresses from Networking tab of Virtual Machine
Increase Size of Disk/Volume (Optional)
The following steps will only increase the disk/volume size. After performing these steps, follow How to Extend Linux LVM Logical Volume to increase the file system size.
- Open the details of the VM for which you want to increase disk size and stop it.
- Wait for machine to be stopped, and then scroll down to Storage and open the Boot disk.
The name of disk will be the same as your VM name. - Edit the disk by clicking the Operation menu icon and select Edit.
- Change the disk size per your requirements and click Save.
- Wait for the disk to be updated, then follow How to Extend Linux LVM Logical Volume.
Troubleshooting
How to assign the IP using netplan
- Follow the https://linuxhint.com/configure-static-ip-netplan/ to assign static ip using netplan
- Sample config file can be found at following location: /home/cteadmin/netskope_netplan_sample.yaml
Cannot complete setup because of timeout error
- If you’re facing the following error “Error occurred while verifying connectivity to ***”, because of network connectivity issues.
What to do: If you’re facing network connectivity issues while running setup for the first time please run one more time.
If the error persists please reach out to your IT admin as this is a network connectivity issue.
ERROR: for *** UnixHTTPConnectionPool
- If you’re facing the following error “ERROR: from core UnixHTTPConnectionPool” please follow the below steps to resolve the error.
What to do: If you’re facing the above error, please down the container and run the start script.
Refer the following commands:
$ cd /opt/cloudexchange/cloudexchange
$ sudo docker-compose down
$ sudo ./start
ERROR: Failed to Setup IP tables
- If you are facing following error “ERROR: Failed to Setup IP tables:”, follow these steps to resolve the error:
What to do: If you’re facing the above error, please restart the docker service as this issue might have occurred after enabling firewall (e.g. firewalld or ufw).
$ sudo systemctl restart docker
Error occurred while fetching plugin updates
- When user tries to update the plugins from UI, despite having github connectivity user might get following error
What to do:
If you are facing the above error then please use the “Upload plugin” feature to upload the latest plugin or run the following command in the host machine from the directory where the Cloud Exchange is deployed.
$ cd /opt/cloudexchange/cloudexchange
$ sudo docker-compose exec core git -C netskope/repos/Default reset --hard
If you’re using the OVA file, you will need to raise a support ticket and get this command executed by the Netskope Support team.