How to install Omada Software Controller on Amazon Linux on AWS (Guide+Script)

How to install Omada Software Controller on Amazon Linux on AWS (Guide+Script)
How to install Omada Software Controller on Amazon Linux on AWS (Guide+Script)
2022-07-20 22:58:33 - last edited 3 weeks ago
Hardware Version:
Firmware Version:

This guide is intended for beginners and covers just initialization/installation of Amazon Linux instance and running Omada Software Controller on it.

 

If you are looking for other guides tested with Amazon AWS free tier:

 

Other guides:

 

If you do not have Amazon's AWS account, you can create one, you will need a credit card for that purpose which will be charged for a test $ 1 and you can start using AWS immediately. The advantage for new users is following ability to use free tier for a year, this is description on AWS about free tier:

 

Free tier: In your first year includes 750 hours of t2.micro (or t3.micro in the Regions in which t2.micro is unavailable) instance usage on free tier AMIs per month, 30 GiB of EBS storage, 2 million IOs, 1 GB of snapshots, and 100 GB of bandwidth to the internet. These are min. steps for instance installation

 

This means that for those who are eligable for free tier, they can run for 12 months their controller for free.

 

  1. After Login, navigate to Instances

  2. Click on Launch Instance

    1. Type name of your instance

    2. Select OS which you want, default is Amazon Linux which this guide covers

    3. Select/Create Key Pair (SSH key)

    4. Under Network settings → Firewall (security groups), allow only SSH access. Open ports for omada
      UDP: 29810
      TCP: 29814
      (for v4.x - v5.0.29 version of software controller, open range of tcp 29811-29814)

      You can create Security Group under Network & Security where you can create rules specifically for omada which can be added to any instance at any point.

    5. Default storage is set to 1x8GB, which is more than sufficient for running only omada on this server.


    When finished configuring your instance, launch it by clicking Launch Instance
     

  3. Login over SSH to your instance

  4. run  sudo -s to become root.

  5. run  /path/to/install-omada-on-amazon-linux.sh 

 

Finished, if you opened ports 8088/8043 like in step 4 explained, then you can open and access your new controller under https://yourawsdomainorip:8043 or http://yourawsdomainorip:8088

 

Please ensure to make your server more secure, look for best practices as well as vpn which you will want to run because you do not want whole world to access your omada controller. Of course you do not need vpn especially if you got static ip on your location, you can restrict access to your service from very simple to extremely complex with AWS, here again documentation and best practices should be studied.

 

If you download and install omada package manually, the only difference to the script is that below commands you can paste as non root user where commands requiring root access are run with sudo:

 

# Set Omada source Tarball url

OMADAURL="https://static.tp-link.com/upload/software/2022/202208/20220822/Omada_SDN_Controller_v5.5.6_Linux_x64.tar.gz" && echo "URL set: ${OMADAURL}"

 

# Set vars from url

OMADATARGZ=$(echo "${OMADAURL}" | awk '{split($0,a,"/"); print a[9]}') && echo "Omada installer filename set: ${OMADATARGZ}"
MYINSTALLERFOLDER=$(echo "${OMADATARGZ}" | sed 's/\.tar\.gz//') && echo "Omada install folder set: ${MYINSTALLERFOLDER}"
 

# Add mongodb repo
cat <<"EOF" | sudo tee /etc/yum.repos.d/mongodb-org-4.4.repo
[mongodb-org-4.4]
name=MongoDB 4.4 Repository
baseurl=https://repo.mongodb.org/yum/amazon/2/mongodb-org/4.4/x86_64
gpgcheck=1
enabled=1
gpgkey=https://www.mongodb.org/static/pgp/server-4.4.asc
EOF

 

# yum update
sudo yum update -y

 

# install dependencies

sudo yum install -y java-1.8.0-openjdk-headless jsvc mongodb-org

 

# download and install omada installer
wget -c ${OMADAURL} -O - | tar -xz 

 

# Make scripts and binaries executable    
chmod +x ${MYINSTALLERFOLDER}/*.sh
chmod +x ${MYINSTALLERFOLDER}/bin/*

 

# Install omada controller, by default it is enabled on boot
cd ${MYINSTALLERFOLDER}
sudo ./install.sh

File:
install-omada-on-amazon-linux_userdata_helper_script_namecheap-ddns_aws_cli_examples.zipDownload
8
8
#1
Options
8 Reply
Re:How to install Omada Software Controller on Amazon Linux on AWS (Guide+Script)
2022-07-21 02:54:08 - last edited 2022-08-27 00:08:14

I can not add second attachment in first post, that is the reason for second post. In attachment of this post you can find userdata file written in functions quite in a simple understandable way. It includes wireguard vpn, omada software controller, mongodb 4.4.15. I've written it quickly and did not really name functions properly, for updated versions you can checkout github where I will update and post more scripts, tutorials and guides, you are welcome to report issues there if you have any, if you have wishes and I have time, I might add them but can not promise when I can dedicate my time for such things. I created those scripts just because I created template on aws, I create omada controller per click (takes few seconds). I might write more advanced guide where you actually install omada controller instance with one aws cli command.

 

On  github you can find also a script installing it simply for Red Hat 8 (if anybody needs it at all) but keep in mind that jsvc is not available for free on RHEL8, script will only work if you got/purchased license and installed jsvc. @Fae I am not sure at all if there is any customer in this world using RHEL8, not sure if and how omada should work without it, but currently one has to buy additionally something to run Omada, I see potential for improvement on that part. 

 

Github: https://github.com/omada-dev/omada-sdn/tree/main/bin

 

Update1: removed attachment and added all files into zip from first post

 

1
1
#2
Options
Re:How to install Omada Software Controller on Amazon Linux on AWS (Guide+Script)
2022-07-22 06:13:45

  @btx Great! Thanks for sharing!

1
1
#3
Options
Re:How to install Omada Software Controller on Amazon Linux on AWS (Guide+Script)
2022-07-22 09:28:44

  @Somnus I guess it is usefull, especially for those who want to save money on controller. Tp-link should provide ability on their omada cloud to setup controller online on aws, console, yandex, ... as they can provide image which also is preconfigured in the way that user just clicks Create cloud controller. I gave all my rpi3s for free as controller and have run out of them, now I provide customers who just want to test with free aws 12month service.

 

Why amazon linux? Because it is quite the same for any linux and there was no guide about aws's default linux image. Glad you like it.

3
3
#4
Options
Re:How to install Omada Software Controller on Amazon Linux on AWS (Guide+Script)
2022-07-25 04:56:29

  @btx I agree with you. Tplink said it is "cloud" controller but actually it's not the same thing as other brand. I'm happy the software is free but tplink should also provide real Cloud Controller, and let customer to buy the license like other brand did.

0
0
#5
Options
Re:How to install Omada Software Controller on Amazon Linux on AWS (Guide+Script)
2022-07-25 10:28:04

  @Somnus I tend to believe they still do not have according contracts with their potential partners. Quite all providers have apis, cli, sdk and creation of omada instance could be even done by some kind of SSO sign in to own account, that is part which makes me believe that they have no contracts, as otherwise dev departments would have already implemented such a simply way of hosting own controller, on own cloud account, which is shown under on omada cloud. Those scripts are quite simple, good documentation available, a lot of examples,... therefore implementation is done quite quickly from developer view, but it is the business which seems to be unsure where to go.

0
0
#6
Options
Re:How to install Omada Software Controller on Amazon Linux on AWS (Guide+Script)
2022-08-01 14:29:37

  @btx Do you know if you are able to manage multiple sites on a hosted controller like this?

 

0
0
#7
Options
Re:How to install Omada Software Controller on Amazon Linux on AWS (Guide+Script)
2022-08-01 17:55:39

  @cxeonline hello, yes you can. There are several ways, most simple would be using static ip of your server and opening required ports. However, it is unsecure, better achieving the same with vpn which is way more secure.

0
0
#8
Options
Re:How to install Omada Software Controller on Amazon Linux on AWS (Guide+Script)
2022-08-06 19:45:36

  Updated guide and scripts:

 - Change url to Omada Software Controller to v5.4.6

0
0
#9
Options