OpenStack comes out of the box with it’s dashboard called Horizon. Horizon provides GUI, which let us manage our OpenStack environment in pretty easy and inuitive way. However basic tasks, like tenant creation or instance commissioning, can be time consuming when performed in Horizon. Using command line interface with previously prepared command templates can be more efficient and faster.
In this tutorial we present how to create Project Tenant in OpenStack Newton using command line intrerface and launch Cirros based Instances inside the Tenant.
Some time ago OpenStack Community introduced new tool called OpenStackClient (OSC) with it’s openstack command utility to unify OpenStack management, which encompasses the following components: Compute, Identity, Image, Object Storage and Block Storage APIs. So far keystone command utility was withdrawn from OpenStack as deprecated and replaced by mentioned openstack command utility. In this tutorial for Newton release we are going to use openstack commands where possible to become familiar with OpenStackClient CLI.
Continue reading “Create tenant in OpenStack Newton using command line interface”
Linux installation process can be simplified by means of Kickstart Installation method, used in Linux distributions like: Red Hat, Debian, Fedora, CentOS, Ubuntu. This method utilizes so called Kickstart File, which describes the configuration, required setup and post installation tasks for Kickstart Linux installation.
Kickstart File can be placed in the remote repository, accesible via NFS, HTTP, FTP, etc…, or can be included in ISO image, which is pretty convenient, especially when we don’t want to or don’t have a possibility to create network repository to store a Kickstart File.
In this tutorial we will download original CentOS 7.2 / RHEL 7.2 ISO image, mount it in the Linux file system, modify it by adding Kickstart File (ks.cfg) and re-pack it to create custom UEFI bootable RHEL 7.2 ISO image using mkisofs command.
Continue reading “Mount | Modify | Edit | Repack | Create UEFI ISO with Kickstart File inside”
Have you ever tried to quickly create USB Boot Disk in Linux and had no dedicated software to create one?
For a long time Linux distributions have come with basic tools like dd utility out of the box. dd command can be used to quickly create USB Boot Disk from the given ISO file without using dedicated tools like unetbootin.
Continue reading “Create USB Boot Disk in Linux using dd command”
Some Linux distributions (for example: RedHat) have aliases configured in the system, especially for root user, which modify basic command line operations like: cp, mv by adding “-i” parameter to prevent user from accidental overwriting or deleting files (interactive mode). This can be disturbing, especially when we are dealing with many files at a time. To get rid of this issue we can modify aliases in the system to disable interactive mode.
Continue reading “Linux cp mv overwrite without prompt (disable interactive mode)”
ifdata is a quick, lightweight and simple tool to display network interface information in Linux, which can be used as an alternative for ip addr show or ifconfig.
Sometimes I want to quickly find out, if the particular network interface exists in the system or I want to display it’s IP address or MTU value only. If I used ifconfig for this case, I would have to parse the output using grep or other tools. ifdata resolves this problem in more sophisticated manner – it utilizes parameters to better control the output we want to obtain. This is another reason why ifdata is more friendly for use in BASH scripting.
Continue reading “ifdata – network interface information tool – ifconfig alternative”
Openstack, besides Horizon GUI Dashboard, can also be configured via command-line interface using commands in Bash. Below we present a list of common and useful commands for your reference.
Note: in OpenStack command-line interface you have to source appropriate keystonerc file in order to be able to invoke OpenStack commands within the specified Project Tenant. Sourcing of keystonerc file imports Tenant User/Admin credentials to environment variables during user session.
Continue reading “OpenStack Command-Line Interface Cheat Sheet”
During OpenStack deployment and testing you may need to quickly create: project tenants, tenant users, networks, routers, security groups, etc… just to check, if Cloud is working properly.
Instead of arduous clicking all this stuff in Horizon dashboard, you can use the below Bash script, which will quickly create:
– multiple project tenants
– 2 tenant users (admin, member)
– tenant networks, sub-networks
– router gateways (to existing public network)
– tenant ports in routers
– security groups (Allow all TCP,UDP,ICMP ingress/egress)
– cirros glance image (cirros-0.3.4-x86_64-disk.img)
Download script: tenant_setup.sh
Continue reading “Bash Script for Automated OpenStack Tenant Creation”
You can compare two text files in Linux using the following command-line tools:
– vim / vimdiff
These tools are already installed “out-of-the-box” in most Linux distributions.
Continue reading “How to compare two files in Linux command line”