Terraform Hints

Terraform now provides new functions, making itself more powerful as a configuration mgmt tool. Here are some memos: To make var value join with fixed string: "test-${each.key}" cidrsubnet From Terraform official documents, they have an example as following and explained in none humane language way. So I’ll try to interpret it from a Network Expert perspective. cidrsubnet(prefix, newbits, netnum) And an example below: > cidrsubnet("172.16.0.0/12", 4, 2) 172.18.0.0/16 > cidrsubnet("10.1.2.0/24", 4, 15) 10.

Continue reading

RedHat Certified System Engineer(EX300) is an advanced and extended exam from EX200. It tests what EX200 already covers and extend them in a more detailed and advanced level. Network Manager Besides what we already know about using nmcli to configure networks, RHCE would like to see if candidates would understand how nmcli and legacy script based config work. A table of Comparison of nm-settings and ifcfg-* Directives nmcli con mod ifcfg-* file Effect ipv4.

Continue reading

RedHat Certified System Administrator(EX200) is the 1st to acquire for most of Redhat advanced certificates(non-cloud, regular system admin path), Here are some hints and memo for learning and preparing for RHCSA. Link Files ln has hard link and soft link. ln newfile.txt /tmp/newfile-hlink2.txt will create a hard link of newfile.txt. hard link means full copy of the original file, the ln created hard link file will exist even if the original file got deleted.

Continue reading

Openshift Setup Hints

All config and cmd in this blog has been verified and tested against Openshift 3.11 release Openshift is Redhat Container Platform, it mainly uses Kubernetes as its PaaS underlay and added more feature such as CICD, app store, etc. How to Install Similar as Kubespray, it uses a toolbox which has root access to all nodes and run ansible scripts to install and deploy everything. Few prerequisites before install:

Continue reading

Openstack Magnum

Magnum is the container cluster orchestration tool for Openstack, it uses Heat to deploy and monitor. The actual workflow would be: Python script to load cluster request –> Inject into Heat templates –> Start building VM –> run conditional actions in Shell –> build all nodes. Prerequisite Few setup need to be done before using Magnum: Node image needs to have property ‘os_distro’ set, fedora requires os_distro=fedora-atomic and coreos needs os_distro=coreos.

Continue reading

Openstack Octavia

All config and cmd in this blog has been verified and tested against Queens release Considering Neutron LBaaS has been replaced by Octavia and marked as depreciated since Queens, I think it’s time to write a brief blog about Octavia. LB is the key to many app services running on Openstack, and it’s critical for K8s environment as it’s the only ingress endpoint for a exposed service. Let’s firstly talk about the issues and weakness that current LBaaS has:

Continue reading

HyperFlex Hints

Upgrade and Mantainance Tool HyperFlex Cluster can be managed by using daemon agent on ESXi hosts directly, users may ssh into agents and issue stcli commands: stcli cluster start or stcli cluster stop can bring down/up entire ceph cluster. stcli node maintenanceMode --ip <hostIP> --mode enter and put a host into HX MM. Upgrade HX agents only: stcli cluster upgrade --components hxdp \ --location /tmp/storfs-packages-1.

Continue reading

Python has some built-in modules for sending emails. Typically we would use smtplib and email modules. email module can build email structure and layout, while smtplib can use and call smtp servers to send emails. email module has many usefull classes: MIMEMultipart: content-type header identifier, marks the position and function of the current paragraph in an email, results in something like this Content-Type: multipart/related; boundary="===============4225807650688820451==". MIMEText: render data into messages, can be plain or html and will become something like this Content-Type: text/html; charset="us-ascii" in a message.

Continue reading

Website security seems increasingly important these days, and have caused some users hesitated to visit a webpage without a trusted cert. To have such a site, owner needs to take care of Domain Name, Server Hosting and SSL certs in tradition,which is way too high for non-profit personal blogs. Is it possible to get them all in one for FREE? The answer is Yes!, let me show you how to get them quickly.

Continue reading

Redhat Setup Hints

Redhat has many modification from regular popular linux distributions. Hostname To change hostname on redhat7, simple as issuing following commands, no needs to change hosts file one by one: hostnamectl set-hostname name Network Manager Redhat uses NM to manage all interface settings, including IP, DNS and Routes. It’s also supported to use traditional script under /etc/sysconfig/network-scripts/ifcfg-*. To show current interface: nmcli con show To add a new interface profile with static IP:

Continue reading

Author's picture

LuLU

Love coding and new technologies

Cloud Solution Consultant

Canada