Installing OpenStack on centos Stream 9 using PackStack, networking Problem - networking

I have installed Openstack using Packstack on centos stream 8 but when i want to use Centos Stream 9 for Openstack ( using packstack ), it through an Error that
OpenStack networking currently does not work on systems that have the
Network Manager service enabled.
But as you may know, network-scripts/ifcfg ... are not Available on Centos 9 anymore!
in case of Centos Stream 8, I have manually disabled and Stoped Network Manager and instead i have been using systemctl enable network to enable the Network availability after reboot or during the installation!
But this is not available for Centos stream 9!
Anyone can give me some insights on how to fix this issue!
Any replacement for Network Manager like what we do on centos stream 8 ( using network ) but for centos Stream 9?
dnf install -y centos-release-openstack-yoga &&
dnf install -y openstack-packstack
packstack --gen-answer-file /root/openstack-answer.txt
Thanks
best regards

This worked for me:
Install centos-release-openstack-yoga and openstack-packstack:
dnf install -y centos-release-openstack-yoga
dnf install -y openstack-packstack
Install network-scripts:
dnf update -y
dnf install -y network-scripts
Disable NetworkManager and enable network service:
systemctl disable NetworkManager
systemctl stop NetworkManager
systemctl enable network
systemctl start network
Install openstack:
packstack --allinone
Check ALL of your network interfaces are configured correctly. For me they weren't, because packstack simply ignored my second NIC and it didn't magically migrate from NetworkManager configuration:
ls -la /etc/sysconfig/network-scripts/ifcfg-*

Related

how to install OpenStack on Ubuntu in 2022

On youtube there are many guides that show how to install openstack on ubuntu I have tried them and they seem not to work
For example with Devstack I fail every time the installation with .Stack.sh, with MicroStack I fail the initialization
I can't install OpenStack in any way!
could somebody help me?
I have installed openstack from various different ways but for me installing through Devstack is the easiest and the most convenient way to do it.
Let me share the installation steps that I use:
Firstly few prerequisites:
A fresh Ubuntu 20.04 installation (Ubuntu 18.04 Works)
8 GB RAM (4 GB RAM works)
4 vCPUs (2 vCPUs works)
Hard disk capacity of 20 GB (min 10 GB)
Step 1 : apt update -y && apt upgrade -y
Step 2: Create Stack user:
sudo adduser -s /bin/bash -d /opt/stack -m stack
echo "stack ALL=(ALL) NOPASSWD: ALL" | sudo tee /etc/sudoers.d/stack
su - stack
Step 3:
git clone https://git.openstack.org/openstack-dev/devstack
cd devstack
Step 4: Create devstack configuration file
vim local.conf
Paste this:
[[local|localrc]]
# Password for KeyStone, Database, RabbitMQ and Service
ADMIN_PASSWORD=admin
DATABASE_PASSWORD=$ADMIN_PASSWORD
RABBIT_PASSWORD=$ADMIN_PASSWORD
SERVICE_PASSWORD=$ADMIN_PASSWORD
# Host IP - get your Server/VM IP address from ip addr command
HOST_IP=0.0.0.0
Step 5: ./stack.sh
The setup will take about 10-15 minutes depending upon your system. Once installation is complete you can access the dashboard using https://your-ip/dashboard
Note: Incase the stack.sh fails make sure to use ./unstack and ./clean.sh before you use stack.sh again.

Amazon linux install openvpn3-client

Trying to install openvpn3-client on my amazon Linux followed this documentation, facing below error
Packages skipped because of dependency problems:
openvpn3-13-0.beta1.el7.x86_64 from copr:copr.fedorainfracloud.org:dsommers:openvpn3
openvpn3-client-13-0.beta1.el7.x86_64 from copr:copr.fedorainfracloud.org:dsommers:openvpn3
openvpn3-selinux-13-0.beta1.el7.noarch from copr:copr.fedorainfracloud.org:dsommers:openvpn3
python36-dbus-1.2.4-4.el7.x86_64 from epel
python36-gobject-base-3.22.0-6.el7.x86_64 from epel
I have already installed epel following this
Amazon linux install openvpn3-client & dependencies as per
https://github.com/OpenVPN/openvpn3-linux
See the instructions on
https://community.openvpn.net/openvpn/wiki/OpenVPN3Linux how to
install pre-built OpenVPN 3 Linux packages on Debian, Ubuntu, Fedora,
Red Hat Enterprise Linux, CentOS and Scientific Linux.
1 solution was to switch from AWS Linux (lack of dependencies & updates) to Fedora on AWS. No longer have to build from source / add dependancices,
older versions had to add the repo as per the above.
When I did an upgrade to Fedora 36 the latest openvpn3-linux v18 client was built in. Did not have to manually upgrade / install it:
openvpn3-admin version --services
e.g: previous v17 suddenly stopped working spend 10 hours trying to debug
"Trying to install openvpn3-client" and reinstall:
openvpn3 config-import --config profile.udp.ovpn --persistent
openvpn3 config-manage --config profile.udp.ovpn --enable-legacy-algorithms true --show
openvpn3 session-start --config profile.udp.ovpn
openvpn3 sessions-list
openvpn3 session-manage --config profile.udp.ovpn --disconnect
Actually thinking it was a cipher AES-256-CBC legacy issue that others were having. It was not for some reason, permissions on install of the OpenVPN3 Linux client? as it was NOT creating a TUN.
So I made one myself (that was the actual issue) and it connected after asking for VPN Username & Password, no need to install again / reinstall afterall:
sudo ip tuntap add name tun0 mode tun
sudo ip link show
Other Amazon linux install openvpn3-client issues help is here: https://github.com/OpenVPN/openvpn3-linux/issues?q=cipher

Fresh install: httpd.service: Unit not found

Currently I'm trying to follow this guide:
https://marxtudor.com/how-to-install-wordpress-using-ssh-on-centos-vps/
I'm using Google Cloud Platform (free edition to test) and I've created a fresh CentOS 7 VM. The guide above are the first commands I fill in and I keep getting this error:
I've followed so many tutorials, created a new VM and all the time I bump into this error that it doesn't know the httpd command.. I even deleted the project and started all over, but still no luck.
[rsa-key-XXXXXX]$ sudo service httpd restart
Redirecting to /bin/systemctl restart httpd.service
Failed to restart httpd.service: Unit not found.
[rsa-key-XXXXXX]$ httpd -t
-bash: httpd: command not found
[rsa-key-XXXXXX]$
Could anyone please let me know what could be causing this ?
Thanks in advance!
I was also getting the same error, this is how i resolved my issue.
After logging to the machine:
Step 1: Become the root user.
command: sudo su
Step 2: Update Kernal
command: yum update -y
Step 3: Install Apache command: yum install
httpd -y
Step 4: Start Apache command: service httpd start
Step 5: Check Status of Service command: service httpd status
This should solve your problem. good luck
Do you want to install WordPress for your Compute Engine VM instance, using CentOS 7?
If this is the case, you may do so by setting up LAMP for your VM, as described here [1], and then download the WordPress release of your choice [2] and install it on your VM.
I understand that you have successfully set up a VM instance using Centos 7, is this correct? Assuming this, and as you may see from [1], for CentOS 7, these would be the commands to perform this installation:
1) Update and install Apache and PHP:
sudo yum check-update
sudo yum -y install httpd php
2) Start the Apache service:
sudo service httpd start
sudo chkconfig httpd on
3) Install, configure and start DB:
sudo yum -y install httpd mariadb-server php php-mysql
sudo systemctl start mariadb
4) Configure MySQL (set a password for the root user if you want):
sudo mysql_secure_installation
5) Restart Apache
sudo service httpd restart
Once MySQL is set up, you will have to create a database for your WordPress installation.
Following this procedure, you will have Apache, MySQL and PHP installed and running on your Compute Engine VM instance.
Then, you can download the WordPress release of your choice [2], unzip the file and install WordPress by visiting your IP address and the folder where WordPress was downloaded. For example, http://YOUR_PUBLIC_VM_IP_ADDRESS/wordpress.
You will be asked for a database name, the user and password. This will allow WordPress to create the wp-config.php file on your behalf and proceed with the installation.
At this point, you should have WordPress already installed on your Compute Engine VM instance using CentOS 7.
An easier way to install WordPress on Compute Engine VM instances, would be by using the Marketpĺace in the Cloud Platform Console. Go to your Products and Services menu > Marketplace, and search for "Wordpress". You will be presented with many different options to launch WordPress in a Compute Engine VM instance. Nevertheless, it seems that Debian is the deafult OS used for these options.
Links:
[1] https://cloud.google.com/community/tutorials/setting-up-lamp
[2] https://wordpress.org/download/
In my case, I resolved it by looking what actual package name had "httpd" in it.
yum search httpd
It returned httpd.x86_64
Also, later on, when doing sudo service httpd start, I received the notification that PolicyKit1 was needed. So, all up, that command installed the package:
yum install -y httpd.x86_64 polkit-qt.x86_64
service httpd start

Cisco VPN client on Ubuntu 16.04 LTS

I am trying to install Cisco VPN Client on Ubuntu, but I am facing problems.
So How can I install it on Ubuntu 16.04 LTS ?
Run
sudo apt-get install network-manager-vpnc network-manager-vpnc-gnome
Then open network manager and add a new VPN, it should show Cisco Compatible VPN in your list now.
I was using the Cisco AnyConnect Client for Linux during the last months, which was in general working, but had a few major bugs.
Most important: whenever you disconnected (also by just switching to another network), you would have to completely restart the computer to make the VPN work again.
I now switched to the open source client called OpenConnect, which is compatible with Cisco's AnyConnect SSL VPN but just works a lot more reliable. To install and enable the VPN, have a look at this: https://people.eng.unimelb.edu.au/lucasjb/oc.html
Edit: just saw that OpenConnect was already proposed in a comment. Leave this answer here as it provides some additional information and a step-by-step manual
OpenConnect offers an opensource command line alternative to Cisco's GUI:
echo "password" | sudo openconnect server --user=username --passwd-on-stdin
See here for more details/source I blatantly stole this answer from: https://askubuntu.com/questions/1043024/how-to-run-openconnect-with-username-and-password-in-a-line-in-the-terminal
Install info here: http://ubuntuhandbook.org/index.php/2014/11/connect-cisco-anyconnect-vpn-ubuntu/
First run command below to active the TUN module (I didn't need this in Ubuntu 18.04.3 LTS):
sudo /sbin/modprobe tun
Install OpenConnect:
sudo apt-get install openconnect
Run command above or:
sudo openconnect SERVERADDR

How to use Vagrant for CentOS with GUI

I am trying to up a Vagrant machine with CentOS version with GUI. Here is my vagrant file:
Vagrant.configure(2) do |config|
config.vm.box = "puppetlabs/centos-7.0-64-nocm"
config.vm.provider :virtualbox do |vb|
vb.name = "DSW-Run-7"
end
config.vm.network "private_network", ip: "192.168.33.13"
config.vm.synced_folder ".", "/home/vagrant/CartoDSW"
config.vm.provider "virtualbox" do |vb|
# Display the VirtualBox GUI when booting the machine
vb.gui = true
vb.memory = "2048"
end
config.vm.provision "shell", inline: <<-SHELL
sudo yum -y install epel-release
sudo yum -y install qt5-qtbase
sudo yum -y install qt5-qtbase-devel
sudo yum -y install jbigkit.x86_64
sudo yum -y install gcc-c++
sudo yum -y install git
sudo yum groupinstall basic-desktop desktop-platform x11 fonts
SHELL
end
After this I did vagrant up and the GUI is up. I tried to login with Vagrant, but Vagrant says 'invalid login':
Centos Linux 7 (core)
kernel 3.10.0-123.e17.x86_64
localhost login:vagrant
password:password
Login incorrect
After vagrant up I did vagrant ssh and used commands such as startx, but still not able to launch the GUI.
Please suggest how I can install CentOS with GUI, as I need to work with QT to debug my code.
To solve this for Centos/7 I installed and launched the GNOME from Vagrant file with the following shell commands:
config.vm.provision "shell", inline: <<-SHELL
sudo yum -y groupinstall "GNOME Desktop"
sudo systemctl set-default graphical.target
sudo systemctl start graphical.target
SHELL
For CentOS 6, I have a repo got it work here: https://github.com/hsiaoyi0504/vagrant_centos_6_gui.
In short, use following codes to install and set up:
config.vm.provision "shell", inline: <<-SHELL
# install GUI desktop
sudo yum update
sudo yum groupinstall -y "X Window System" "Desktop"
sudo yum install -y gnome-core xfce4 xorg-x11-fonts
sudo echo "id:5:initdefault:" > /etc/inittab
# fix fonts problem in terminal
# https://forums.anandtech.com/threads/fonts-screwed-up-in-centos-6-terminal.2186468/
sudo yum -y install terminus-fonts terminus-fonts-console
reboot # reboot to load GUI
SHELL
Put the following into your Vagrantfile, to reset passwords. Works on Centos 6x images I typically use
config.vm.provision :shell, :inline => "echo \"vagrant\"|passwd --stdin vagrant"
config.vm.provision :shell, :inline => "echo \"vagrant\"|passwd --stdin root"
For example:
https://github.com/lastnitescurry/documentum71/blob/master/Vagrantfile
Figured it out from:
https://github.com/puphpet/packer-templates/blob/master/centos-6-x86_64/http/ks.cfg
There are 2 potential solutions:
first : using a GUI and boot the GUI directly
second : using x11 forwarding
First Option : Boot in GUI mode
vagrant user has no password in most cases (unless you specified otherwise and build a new box) as it connects with ssh key.
If you want to connect via GUI, you'll need to give the user a new password.
run vagrant ssh to connect into the VM
run sudo passwd to enter a new password for your user
From there you will be able to login via GUI and then make sure you have X environment to start working on, you can install
sudo yum install 'xorg*'
sudo yum install xterm
or to install a Gnome environment
yum -y groups install "GNOME Desktop"
Make sure to set your Vagrantfile with
config.vm.provider "virtualbox" do |vb|
vb.gui = true
end
and your GUI will boot when you run vagrant up
The Alternative, your second option : use X11 forwarding
From what you try to achieve, there might be a better way (but I am not familiar enough with QT to really judge). Vagrant has an option to forward X11.
config.ssh.forward_x11 - If true, X11 forwarding over SSH
connections is enabled. Defaults to false.
You will need a X11 client on your host (If you run on mac you can download and use XQuartz it does the job pretty well, if you're running on another system, check for an equivalent)
So when you have your X11 client installed on your host and turn on config.ssh.forward_x11 you can run directly X-command and they will be forwarded on your host so
sudo yum install xterm
xterm &
and the xterm window will appear on your host machine.
Note: you may need to install xauth on the VM, using e.g. sudo apt-get install xauth (Debian/Ubuntu/...) or yum install xorg-x11-xauth (CentOS, Fedora, ...).

Resources