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

To remotely control AD add/delete user via Powershell: ssh -i lab.key -o StrictHostKeyChecking=No [email protected] "powershell New-ADUser -Server 10.1.1.1 -Enabled \$True -SAMAccountName $newaccount -DisplayName $newaccount -Givenname $givenname -Surname $surname -Name '$givenname $surname' -UserPrincipalName [email protected] -HomeDirectory \\\\xxx\\userdata\$\\$newaccount -AccountPassword (ConvertTo-SecureString "password"-AsPlainText -force) -PassThru" Note: the \ mark needs to be escaped in regular ssh session, that’s why I use \\\\ to express \\, but if we use this on Spinnaker, the Java interpretor will automatically add escape mark, so \ is not required.

Continue reading

转自int32bit blgo OpenStack高级特性简介 1. 虚拟机软删除 通常情况下,当用户删除虚拟机时,虚拟机会立即从hypervisor底层删除,不可撤回。为了防止人为误操作,Nova支持开启软删除(soft delete)功能,或者称为延迟删除,延迟删除时间通过Nova配置项/etc/nova/nova.conf的reclaim_instance_interval项指定,如下: [DEFAULT] ... reclaim_instance_interval = 120 此时虚拟机执行普通删除操作时,Nova不会立即删除虚拟机,而是会等待两分钟的时间,在此时间间隔内,管理员可以随时恢复虚拟机,只有在超过120秒后虚拟机才会真正执行删除操作,不可恢复。 为了演示该功能,我们删除一台虚拟机int32bit-test-2: # nova list +--------------------------------------+-----------------+--------+------------+-------------+-------------------+ | ID | Name | Status | Task State | Power State | Networks | +--------------------------------------+-----------------+--------+------------+-------------+-------------------+ | 8f082394-ffd2-47db-9837-a8cbd1e011a1 | int32bit-test-1 | ACTIVE | - | Running | private=10.0.0.6 | | 9ef2eea4-77dc-4994-a2d3-a7bc59400d22 | int32bit-test-2 | ACTIVE | - | Running | private=10.0.0.13 | +--------------------------------------+-----------------+--------+------------+-------------+-------------------+ # nova delete 9ef2eea4-77dc-4994-a2d3-a7bc59400d22 Request to delete server 9ef2eea4-77dc-4994-a2d3-a7bc59400d22 has been accepted.

Continue reading

Author's picture

LuLU

Love coding and new technologies

Cloud Solution Consultant

Canada