Cloud Native Applications and VMware
December 15, 2016 1 Comment
After quite a bit of radio silence I’m going to write about Cloud Native Applications and VMware approach to those.
After spending some time looking into container technologies with open source software it’s nice to see that VMware is jumping on the boat by adding their enterprise vision which is probably the missing part compared to other solutions.
I will start by preparing a template for all the services that I will install and I will do it the VMware way by using PhotonOS which I intend to use as proof of concept for vSphere Integrated Containers (VIC), Photon Controller, Harbor and Admiral.
PhotonOS is a lightweight operating system written just for running containerized applications and such; I have to say that after getting familiar with it I quite like its simplicity and quick approach to all day to day activities.
First thing first, you have to choose your deployment type, there are a few:
I won’t describe the process as it’s pretty straightforward, I’ll just say that I manually installed PhotonOS with the ISO choosing the Minimal install option.
After installing we need the IP address and we also need to enable root to ssh into the box:
ip add # show ip address info vi /etc/ssh/sshd_config # PermitRootLogin = yes systemctl restart sshd # restart ssh deamon
Then ssh as root and continue:
mkdir .ssh echo "your_key" >> .ssh/authorized_keys
tdnf check-update open-vm-tools.x86_64 10.0.5-12.ph1 photon-updates nss.x86_64 3.25-1.ph1 photon-updates shadow.x86_64 4.2.1-8.ph1 photon-updates linux.x86_64 4.4.8-8.ph1 photon-updates python-xml.x86_64 2.7.11-5.ph1 photon-updates docker.x86_64 1.11.2-1.ph1 photon-updates systemd.x86_64 228-25.ph1 photon-updates python2-libs.x86_64 2.7.11-5.ph1 photon-updates python2.x86_64 2.7.11-5.ph1 photon-updates procps-ng.x86_64 3.3.11-3.ph1 photon-updates filesystem.x86_64 1.0-8.ph1 photon-updates openssl.x86_64 1.0.2h-3.ph1 photon-updates systemd.x86_64 228-26.ph1 photon-updates systemd.x86_64 228-30.ph1 photon-updates python2-libs.x86_64 2.7.11-7.ph1 photon-updates python-xml.x86_64 2.7.11-7.ph1 photon-updates python2.x86_64 2.7.11-7.ph1 photon-updates curl.x86_64 7.47.1-3.ph1 photon-updates pcre.x86_64 8.39-1.ph1 photon-updates openssl.x86_64 1.0.2h-5.ph1 photon-updates openssh.x86_64 7.1p2-4.ph1 photon-updates openssl.x86_64 1.0.2j-1.ph1 photon-updates iptables.x86_64 1.6.0-5.ph1 photon-updates systemd.x86_64 228-31.ph1 photon-updates initramfs.x86_64 1.0-4.1146888.ph1 photon-updates glibc.x86_64 2.22-9.ph1 photon-updates open-vm-tools.x86_64 10.0.5-13.ph1 photon-updates rpm.x86_64 4.11.2-11.ph1 photon-updates linux.x86_64 4.4.26-1.ph1 photon-updates initramfs.x86_64 1.0-5.11330561.ph1 photon-updates python2.x86_64 2.7.11-8.ph1 photon-updates curl.x86_64 7.47.1-4.ph1 photon-updates bzip2.x86_64 1.0.6-6.ph1 photon-updates tzdata.noarch 2016h-1.ph1 photon-updates expat.x86_64 2.2.0-1.ph1 photon-updates python2-libs.x86_64 2.7.11-8.ph1 photon-updates python-xml.x86_64 2.7.11-8.ph1 photon-updates docker.x86_64 1.12.1-1.ph1 photon-updates cloud-init.x86_64 0.7.6-12.ph1 photon-updates bridge-utils.x86_64 1.5-3.ph1 photon-updates linux.x86_64 4.4.31-2.ph1 photon-updates systemd.x86_64 228-32.ph1 photon-updates curl.x86_64 7.51.0-1.ph1 photon-updates initramfs.x86_64 1.0-5.11343362.ph1 photon-updates cloud-init.x86_64 0.7.6-13.ph1 photon-updates open-vm-tools.x86_64 10.1.0-1.ph1 photon-updates initramfs.x86_64 1.0-5.11353601.ph1 photon-updates cloud-init.x86_64 0.7.6-14.ph1 photon-updates vim.x86_64 7.4-6.ph1 photon-updates linux.x86_64 4.4.35-1.ph1 photon-updates libtasn1.x86_64 4.7-3.ph1 photon-updates
tdnf upgrade -y Upgrading: vim x86_64 7.4-6.ph1 1.93 M tzdata noarch 2016h-1.ph1 1.52 M systemd x86_64 228-32.ph1 28.92 M shadow x86_64 4.2.1-8.ph1 3.85 M rpm x86_64 4.11.2-11.ph1 4.28 M python2 x86_64 2.7.11-8.ph1 1.82 M python2-libs x86_64 2.7.11-8.ph1 15.30 M python-xml x86_64 2.7.11-8.ph1 318.67 k procps-ng x86_64 3.3.11-3.ph1 1.04 M pcre x86_64 8.39-1.ph1 960.35 k openssl x86_64 1.0.2j-1.ph1 5.23 M openssh x86_64 7.1p2-4.ph1 4.23 M open-vm-tools x86_64 10.1.0-1.ph1 2.45 M nss x86_64 3.25-1.ph1 3.87 M libtasn1 x86_64 4.7-3.ph1 161.48 k iptables x86_64 1.6.0-5.ph1 1.46 M linux x86_64 4.4.35-1.ph1 44.76 M initramfs x86_64 1.0-5.11353601.ph1 11.49 M glibc x86_64 2.22-9.ph1 50.97 M filesystem x86_64 1.0-8.ph1 7.14 k expat x86_64 2.2.0-1.ph1 242.58 k docker x86_64 1.12.1-1.ph1 82.59 M curl x86_64 7.51.0-1.ph1 1.24 M cloud-init x86_64 0.7.6-14.ph1 1.93 M bzip2 x86_64 1.0.6-6.ph1 1.65 M bridge-utils x86_64 1.5-3.ph1 36.61 k Total installed size: 272.23 M Downloading: bridge-utils 19201 100% bzip2 526008 100% cloud-init 509729 100% curl 898898 100% docker 25657821 100% expat 92851 100% filesystem 16357 100% glibc 19396323 100% initramfs 11983289 100% linux 18887362 100% iptables 416848 100% libtasn1 98060 100% nss 1591172 100% open-vm-tools 912998 100% openssh 1853448 100% openssl 3192392 100% pcre 383441 100% procps-ng 458368 100% python-xml 86471 100% python2-libs 5651168 100% python2 741755 100% rpm 1761294 100% shadow 2002202 100% systemd 11856941 100% tzdata 633502 100% vim 1046120 100% Testing transaction Running transaction Creating ldconfig cache Complete!
After that I rebooted since the “linux” package was updated and that stands for the kernel version.
You can check the kernel version loaded with:
uname -a
More customizations:
vi /boot/grub2/grub.cfg # edit "set timeout=1" iptables --list # show iptables config which by defaults allows only SSH inbound vi /etc/systemd/scripts/iptables # edit iptables config file
I like to enable ICMP inbound, you can find the rule I added as the last one before the end of file:
systemctl restart iptables iptables --list # check running configuration includes ICMP inbound systemctl enable docker # enable docker loaded at boot
In coming days I will follow up with VIC, Photon Controller, Harbor and Admiral using this PhotonOS VM as template.
Pingback: vSphere Integrated Containers | MyVirtuaLife.Net