AWS/Azure – Development Environment Setup for Containerization

In this article we will setup our development environment to utilize containerization technology in future series/demos.

Technology that we will work with are Kubernetes (AWS EKS (Elastic Kubernetes Service)/Azure AKS (Azure Kubernetes Service) ) and Docker (AWS ECR (Elastic Container Registry)/Azure ACR (Azure Container Registry) ).

Kubernetes allows for management of containers to provide scalability, high availability and fault tolerance among others. Containers are isolated packages/images, that contain all that is needed to run an application. They are lightweight, portable and ensures runtime is consistent.

–>
The below was written using Ubuntu 18.04.2-LTS Desktop (minimal) and Windows Subsystem (Windows 10 Insider Preview; 18950.1000 (Fast Ring); 18362.267 (May 2019 Update)) for Linux (WSL2 and WSL1; Ubuntu). It should be applicable to Debian, Ubuntu Docker (lsb-release package has been left in to accommodate) and will be applicable to any Fast Ring Windows 10 build >= 18917.

Note: Any build lower then 18917, should use Docker Desktop and use the .exe commands in WSL via named pipes.

If you are using Windows 10 Home or any non Windows based 10 build, then please use Vagrant (non-Windows 10) to spin up a Virtual Machine or Docker Toolbox (Windows 10 Home in conjunction with WSL).
<–

–>
Windows 10:
Start -> Control Panel -> Programs and Features -> Turn Windows features on or off -> Select Windows Subsystem for Linux -> ok -> Restart now.

Open a Browser -> WSL Store -> Open Microsoft Store -> Ubuntu -> Get -> Launch or Start -> Search for programs and files -> Ubuntu (with the colored circular icon and hit enter) -> Installing, this may take a few minutes… -> Enter new UNIX username: -> Enter new UNIX password: -> Retype new UNIX password: -> Right click the command window (on the toolbar) -> Options -> Quick Edit Mode -> ok
<–

–>
Not for Windows 10 builds < 18917

$ logout

Start -> Search for powershell -> right click -> Run as administrator and select Yes to the Elevated UAC prompt)
PS > Enable-WindowsOptionalFeature -Online -FeatureName VirtualMachinePlatform

Select Reboot (default) when prompted.

Convert Ubuntu to WSL2:
Start -> Run: powershell

To see what Distros are installed, state and version:

> wsl -l -v 

Set WSL2 on the distribution:

> wsl --set-version Ubuntu 2 

Note: This will take a while.

After it is finished, run the command, 2 lines above (which was used to list) to see that it is now Version 2.

Start -> Search for programs and files -> Ubuntu (with the colored circular icon and hit enter)
<–

Install some prerequisites:
Note: software-properties-common isn’t needed if not installing docker (Windows 10 (WSL) builds < 18917).

$ sudo apt update
$ sudo apt install -y python3-pip apt-transport-https ca-certificates curl gnupg2 lsb-release software-properties-common

–>
Restart services during package upgrades without asking? -> Tab to <Yes> and hit Enter.
<–

Install AWS CLI:

$ pip3 install awscli --upgrade --user && chmod 754 ~/.local/bin/aws

Install EKSCTL (weaveworks):

$ curl --silent --location "https://github.com/weaveworks/eksctl/releases/download/latest_release/eksctl_$(uname -s)_amd64.tar.gz" | tar xz -C ~/.local/bin && chmod 754 ~/.local/bin/eksctl

Install KUBECTL:

$ curl -o ~/.local/bin/kubectl --silent -LO https://storage.googleapis.com/kubernetes-release/release/$(curl -s https://storage.googleapis.com/kubernetes-release/release/stable.txt)/bin/linux/amd64/kubectl && chmod 754 ~/.local/bin/kubectl

Install Docker:

–>
Not for Windows 10 (WSL) < 18917.

$ curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
$ sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable"
$ sudo apt update
$ sudo apt install -y docker-ce

Show the status of docker (it should be enabled and running; if not then perform an ‘enable’ and ‘start’ (without the ‘| grep …’):

–>
Not for Windows 10 (WSL).

$ systemctl status docker | grep -i "loaded\|active"

<–

–>
For Windows 10 (WSL (>=18917)).

Start and show the status of docker:

$ sudo service docker start
$ sudo service docker status

It should come up in to a running state.

Note: This will stay running as a background task when WSL is closed, however when the host is rebooted/user session is logged out of, it will need to be launched again once opening WSL. This section will be updated on how to have this start when the host boots at a later time.
<–

Install Docker Compose:

–>
Not for Windows 10 (WSL) < 18917.

$ pip3 install docker-compose --upgrade --user && chmod 754 ~/.local/bin/docker-compose

Allow your user the right to execute docker without sudo:

$ sudo usermod -aG docker $USER
$ logout

Log back in to a shell.

Create a work folder, inside your home directory:

$ mkdir -p dev/docker

<–

–>
For Windows 10 builds < 18917

Start -> Control Panel -> Programs and Features -> Turn Windows features on or off -> Select Hyper-V and Containers -> ok -> Restart now.

Install Docker Desktop -> Leave Defaults -> Log out and back in -> System Tray should show it Launching to a Run state.

Click System Tray -> Settings -> Shared Drives -> Select C -> Apply -> Type in your Windows user’s password to confirm -> close out of settings

Launch the WSL shell.

Create a work folder inside the Windows mount, symbolic link it within your home directory inside WSL and alias the .exe with the bare commands for docker/docker-compose and add for permanence:

$ mkdir -p /mnt/c/dev/docker
$ ln -s /mnt/c/dev dev
$ cat << EOF >> ~/.bashrc
>
> alias docker=docker.exe
> alias docker-compose=docker-compose.exe
> EOF
$ alias docker=docker.exe
$ alias docker-compose=docker-compose.exe

<–

Install Azure CLI:

$ curl -sL https://packages.microsoft.com/keys/microsoft.asc | gpg --dearmor | sudo tee /etc/apt/trusted.gpg.d/microsoft.asc.gpg 1>/dev/null
$ echo "deb [arch=amd64] https://packages.microsoft.com/repos/azure-cli/ $(lsb_release -cs) main" | sudo tee /etc/apt/sources.list.d/azure-cli.list
$ sudo apt update
$ sudo apt install -y azure-cli

Add .local/bin located in your HOME Directory in to your PATH for permanence:

$ cat << 'EOF' >> ~/.bashrc
>
> export PATH=$PATH:~/.local/bin
> EOF
$ export PATH=$PATH:~/.local/bin 

Ensure version output is shown:

$ aws --version
$ eksctl version
$ kubectl version 2>/dev/null
$ docker --version
$ docker-compose --version
$ az --version

References:

Source:
home_pershoot

Firmware – CyanogenMod 11 (KitKat) – Transformer Pad (TF701T – Macallan)

This is CyanogenMod 11 (KitKat (4.4.4 – KTU84Q)) for ASUS’s Transformer Pad (TF701T – Macallan).

Local: Use Open JDK 1.7.0_111 64bit.

-sync latest changes from CyanogenMod OS repo (cm-11.0)

…..

Rom Base:
Sync’d as of 8/8.

Recovery:
Built recovery is CWM 6.0.5.1 (cm-11.0).

Note:
-You must be unlocked (use ASUS’s unlock tool to perform this)
-You must be on at least 10.26.1.18 bootloader but it is reccomended to update to 11.4.1.29 (updating to ASUS’s latest 4.4.2 release will install this). It is best to update to this build (11.4.1.29) via MicroSD update method (as outlined on ASUS’s site). You can also get a CWM flash-able boot-loader package here (US only): http://droidbasement.com/asus/tf701t/stock/4.4.2-11.4.1.29/TF701T_K00C-11.4.1.29-US_BL.zip

…..

Known Issues:

…..

Enjoy!

For:
TF701T

…..

Installation Instructions:
-boot in to bootloader (power and vol +/-)
-fastboot boot recovery.img (you can fastboot flash recovery recovery.img for permanence)
-adb shell mount /data
-adb push cm-11-YYYYMMDD-UNOFFICIAL-tf701t.zip /data/media/
-take a nandroid backup
-flash lineage-11-YYYYMMDD-UNOFFICIAL-tf701t.zip
-transfer and flash gapps for CM11: http://wiki.cyanogenmod.org/w/Google_Apps
-it is best to wipe when coming from stock
-reboot

…..

Download:
TF701T: http://droidbasement.com/asus/tf701t/cm
Recovery: http://droidbasement.com/asus/tf701t/recovery/

…..

Source: https://github.com/cyanogenmod , https://github.com/pershoot

Firmware – CyanogenMod 12.1 (Lollipop) – Transformer Pad (TF701T – Macallan)

This is CyanogenMod 12.1 (Lollipop (5.1.1 – LMY49F)) for ASUS’s Transformer Pad (TF701T – Macallan).

Local: Use OpenJDK 1.7.0_111 64bit.

-sync latest changes from CyanogenMod OS repo (cm-12.1)

…..

Rom Base:
Sync’d as of 8/8.

Recovery:
CM Recovery
-Note:
You can also Use CWM 6.0.5.1 (select ‘No’ after flash to CWM’s offer to fix root).

Note:
-You must be unlocked (use ASUS’s unlock tool to perform this)
-You must be on at least 10.26.1.18 bootloader but it is reccomended to update to 11.4.1.29 (updating to ASUS’s latest 4.4.2 release will install this). It is best to update to this build (11.4.1.29) via MicroSD update method (as outlined on ASUS’s site). You can also get a CWM flash-able boot-loader package here (US only): http://droidbasement.com/asus/tf701t/stock/4.4.2-11.4.1.29/TF701T_K00C-11.4.1.29-US_BL.zip

…..

Known Issues:
-When phone audio is selected on a supported BT device; mediaserver will segfault and could cause system instability.
-Userdata encryption is currently not operational.

…..

Enjoy!

For:
TF701T

…..

Installation Instructions:
-boot in to bootloader (power and vol +/-)
-fastboot boot recovery.img (you can fastboot flash recovery recovery.img for permanence); wait a few seconds for the recovery screen.
-adb shell mount /data
-adb push cm-12.1-YYYYMMDD-UNOFFICIAL-tf701t.zip /data/media/
-take a nandroid backup (CWM only)
-flash cm-12.1-YYYYMMDD-UNOFFICIAL-tf701t.zip
-transfer and flash gapps for Android 5.1: http://download.dirtyunicorns.com/files/gapps/banks_gapps/5.x.x/ (latest for 5.1.x is 10-20-15)
-it is best to wipe when coming from stock (Note: You can upgrade from CM12)
-reboot

…..

Download:
TF701T: http://droidbasement.com/asus/tf701t/cm/12.1
Recovery: http://droidbasement.com/asus/tf701t/recovery/cm/12.1

…..

Source: https://github.com/cyanogenmod , https://github.com/pershoot

Firmware – Asuswrt-Merlin (NG) – 384.13 – RT-AC68

This is Merlin’s Asuswrt (NG) 384.13 for the ASUS RT-AC68U/R.

-sync latest changes from RMerlin (master).

—–

Download (ASUS RT-AC68U/R):
RT-AC68U_384.13_0.trx
Download: RT-AC68U_384.13_0.trx

—–

Source:
https://github.com/pershoot/asuswrt-merlin.ng
https://github.com/RMerl/asuswrt-merlin.ng

——–

Installation instructions:

-Flash the .trx through the UI
-After it is completed and you are returned back to the UI, wait a short while (~30 seconds) then power cycle the router (with the on/off button).

Overview – DEVOPS?!

DEVOPS?!

While not a new concept, it being labelled as such are recent and the methodologies have been adjusted/updated as well.

Perhaps you have a background such as myself, coming from the old-world where one was performing these responsibilities using custom shell scripts, proprietary Content Management/Versioning Systems, raw shared mounts to promote/copy to stages, deploying templated systems on to server farms by hand, etc. These days, there are a lot of tools and systems available to streamline these processes.

Gone are the days of having rigid compartmentalization and what has risen are Developers performing Operations and Operations performing Development. This creates a cohesive unit to get things prim and proper at an accelerated rate, before landing in to Production. Attaining minimalism is a goal to strive for.

In this section I take you through an up-skill and assimilation in to ‘modern’ Development Operations as it pertains to the Cloud platform/framework.

Firmware – Asuswrt-Merlin (NG) – 384.12 – RT-AC68

This is Merlin’s Asuswrt (NG) 384.12 for the ASUS RT-AC68U/R.

-sync latest changes from RMerlin (master).

—–

Download (ASUS RT-AC68U/R):
RT-AC68U_384.12_0.trx
Download: RT-AC68U_384.12_0.trx

—–

Source:
https://github.com/pershoot/asuswrt-merlin.ng
https://github.com/RMerl/asuswrt-merlin.ng

——–

Installation instructions:

-Flash the .trx through the UI
-After it is completed and you are returned back to the UI, wait a short while (~30 seconds) then power cycle the router (with the on/off button).

Firmware – Asuswrt-Merlin (NG) – 384.12_beta2 – RT-AC68

This is Merlin’s Asuswrt (NG) 384.12_beta2 for the ASUS RT-AC68U/R.

-sync latest changes from RMerlin (master).

—–

Download (ASUS RT-AC68U/R):
RT-AC68U_384.12_beta2.trx
Download: RT-AC68U_384.12_beta2.trx

—–

Source:
https://github.com/pershoot/asuswrt-merlin.ng
https://github.com/RMerl/asuswrt-merlin.ng

——–

Installation instructions:

-Flash the .trx through the UI
-After it is completed and you are returned back to the UI, wait a short while (~30 seconds) then power cycle the router (with the on/off button).

Firmware – Asuswrt-Merlin (NG) – 384.12_beta1 – RT-AC68

This is Merlin’s Asuswrt (NG) 384.12_beta1 for the ASUS RT-AC68U/R.

-sync latest changes from RMerlin (master).

—–

Download (ASUS RT-AC68U/R):
RT-AC68U_384.12_beta1.trx
Download: RT-AC68U_384.12_beta1.trx

—–

Source:
https://github.com/pershoot/asuswrt-merlin.ng
https://github.com/RMerl/asuswrt-merlin.ng

——–

Installation instructions:

-Flash the .trx through the UI
-After it is completed and you are returned back to the UI, wait a short while (~30 seconds) then power cycle the router (with the on/off button).

Firmware – CyanogenMod 11 (KitKat) – Transformer Pad (TF701T – Macallan)

This is CyanogenMod 11 (KitKat (4.4.4 – KTU84Q)) for ASUS’s Transformer Pad (TF701T – Macallan).

Local: Use Open JDK 1.7.0_111 64bit.

-sync latest changes from CyanogenMod OS repo (cm-11.0)

…..

Rom Base:
Sync’d as of 6/7.

Recovery:
Built recovery is CWM 6.0.5.1 (cm-11.0).

Note:
-You must be unlocked (use ASUS’s unlock tool to perform this)
-You must be on at least 10.26.1.18 bootloader but it is reccomended to update to 11.4.1.29 (updating to ASUS’s latest 4.4.2 release will install this). It is best to update to this build (11.4.1.29) via MicroSD update method (as outlined on ASUS’s site). You can also get a CWM flash-able boot-loader package here (US only): http://droidbasement.com/asus/tf701t/stock/4.4.2-11.4.1.29/TF701T_K00C-11.4.1.29-US_BL.zip

…..

Known Issues:

…..

Enjoy!

For:
TF701T

…..

Installation Instructions:
-boot in to bootloader (power and vol +/-)
-fastboot boot recovery.img (you can fastboot flash recovery recovery.img for permanence)
-adb shell mount /data
-adb push cm-11-YYYYMMDD-UNOFFICIAL-tf701t.zip /data/media/
-take a nandroid backup
-flash lineage-11-YYYYMMDD-UNOFFICIAL-tf701t.zip
-transfer and flash gapps for CM11: http://wiki.cyanogenmod.org/w/Google_Apps
-it is best to wipe when coming from stock
-reboot

…..

Download:
TF701T: http://droidbasement.com/asus/tf701t/cm
Recovery: http://droidbasement.com/asus/tf701t/recovery/

…..

Source: https://github.com/cyanogenmod , https://github.com/pershoot

Firmware – CyanogenMod 12.1 (Lollipop) – Transformer Pad (TF701T – Macallan)

This is CyanogenMod 12.1 (Lollipop (5.1.1 – LMY49F)) for ASUS’s Transformer Pad (TF701T – Macallan).

Local: Use OpenJDK 1.7.0_111 64bit.

-sync latest changes from CyanogenMod OS repo (cm-12.1)

…..

Rom Base:
Sync’d as of 6/7.

Recovery:
CM Recovery
-Note:
You can also Use CWM 6.0.5.1 (select ‘No’ after flash to CWM’s offer to fix root).

Note:
-You must be unlocked (use ASUS’s unlock tool to perform this)
-You must be on at least 10.26.1.18 bootloader but it is reccomended to update to 11.4.1.29 (updating to ASUS’s latest 4.4.2 release will install this). It is best to update to this build (11.4.1.29) via MicroSD update method (as outlined on ASUS’s site). You can also get a CWM flash-able boot-loader package here (US only): http://droidbasement.com/asus/tf701t/stock/4.4.2-11.4.1.29/TF701T_K00C-11.4.1.29-US_BL.zip

…..

Known Issues:
-When phone audio is selected on a supported BT device; mediaserver will segfault and could cause system instability.
-Userdata encryption is currently not operational.

…..

Enjoy!

For:
TF701T

…..

Installation Instructions:
-boot in to bootloader (power and vol +/-)
-fastboot boot recovery.img (you can fastboot flash recovery recovery.img for permanence); wait a few seconds for the recovery screen.
-adb shell mount /data
-adb push cm-12.1-YYYYMMDD-UNOFFICIAL-tf701t.zip /data/media/
-take a nandroid backup (CWM only)
-flash cm-12.1-YYYYMMDD-UNOFFICIAL-tf701t.zip
-transfer and flash gapps for Android 5.1: http://download.dirtyunicorns.com/files/gapps/banks_gapps/5.x.x/ (latest for 5.1.x is 10-20-15)
-it is best to wipe when coming from stock (Note: You can upgrade from CM12)
-reboot

…..

Download:
TF701T: http://droidbasement.com/asus/tf701t/cm/12.1
Recovery: http://droidbasement.com/asus/tf701t/recovery/cm/12.1

…..

Source: https://github.com/cyanogenmod , https://github.com/pershoot