Skip to content

Commit

Permalink
updating readme
Browse files Browse the repository at this point in the history
  • Loading branch information
tosin2013 committed Jun 9, 2023
1 parent 087afb6 commit 9b9ab9d
Show file tree
Hide file tree
Showing 5 changed files with 25 additions and 79 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ INSTALL_PATH = ~/.ansible-navigator.yml
SOURCE_FILE = ~/qubinode_navigator/ansible-navigator/release-ansible-navigator.yml

INSTALL_ANSIBLE_NAVIGATOR := pip3 install ansible-navigator
BUILD_CMD := tag=$(TAG) && cd ~/qubinode_navigator/ansible-builder/ && ansible-builder build -f qubinode-installer.yml -t qubinode-installer:$${tag} -v 3
BUILD_CMD := tag=$(TAG) && cd ~/qubinode_navigator/ansible-builder/ && ansible-builder build -f execution-environment.yml -t qubinode-installer:$${tag} -v 3
COPY_NAVIGATOR_CMD := cp $(SOURCE_FILE) $(INSTALL_PATH)
PODMAN_LOGIN := podman login registry.redhat.io
LIST_INVENTORY_CMD := ansible-navigator inventory --list -m stdout
Expand Down
3 changes: 1 addition & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ This repository contains a quickstart script setup.sh to set up and configure Qu
* Linux-based operating system (RHEL 9.2, CentOS, Rocky Linux, or Fedora)
* Git


## Quickstart

### Running on RHEL, CentOS, or Fedora
Expand Down Expand Up @@ -172,4 +171,4 @@ python3 trigger-gitlab-pipeline.py --project_id=1 --token=glpt-mytoken --ref=mai
## Contributing
Please submit bug reports, suggestions, and improvements as GitHub issues.

See [Developers Guide](docs/developers.rst) for more information.
See [Developers Guide](docs/developers.md) for more information.
File renamed without changes.
40 changes: 21 additions & 19 deletions docs/developers.rst → docs/developers.md
Original file line number Diff line number Diff line change
@@ -1,36 +1,36 @@
=============

Developers Guide
=============

Getting Started
===============
## Getting Started


Git Clone Repo
**Git Clone Repo**
```
git clone https://github.com/tosin2013/qubinode_navigator.git
cd $HOME/qubinode_navigator/
```

Configure SSH
**Configure SSH**
```
IP_ADDRESS=$(hostname -I | awk '{print $1}')
ssh-keygen -f ~/.ssh/id_rsa -t rsa -N ''
ssh-copy-id $USER@${IP_ADDRESS}
```

Install Ansible Navigator
**Install Ansible Navigator**
```bash
make install-ansible-navigator
```

If you use Red Hat Enterprise Linux with an active Subscription, you might have to lo log into the registry first:
**If you use Red Hat Enterprise Linux with an active Subscription, you might have to lo log into the registry first:**

```bash
make podman-login
```

Create Ansible navigator config file
**Create Ansible navigator config file**
```
# export INVENTORY=supermicro
# cat >~/.ansible-navigator.yml<<EOF
Expand All @@ -57,14 +57,16 @@ ansible-navigator:
enable: false
EOF
```
Add hosts file

**Add hosts file**
```
# control_user=admin
# control_host=$(hostname -I | awk '{print $1}')
echo "[control]" > inventories/${INVENTORY}/hosts
echo "control ansible_host=${control_host} ansible_user=${control_user}" >> inventories/${INVENTORY}/hosts
```
Create Requirement file for ansible builder

**Create Requirement file for ansible builder**
```
cat >ansible-builder/requirements.yml<<EOF
---
Expand All @@ -84,23 +86,23 @@ roles:
EOF
```

Build the image:
**update the tag in the make file to update release**

**Build the image:**
```bash
make build-image
```

Configure Ansible Vault
**Configure Ansible Vault**
```bash
curl -OL https://gist.githubusercontent.com/tosin2013/022841d90216df8617244ab6d6aceaf8/raw/92400b9e459351d204feb67b985c08df6477d7fa/ansible_vault_setup.sh
chmod +x ansible_vault_setup.sh
./ansible_vault_setup.sh
```

Install and configure ansible safe
**Install and configure ansible safe**
```bash
curl -OL https://github.com/tosin2013/ansiblesafe/releases/download/v0.0.5/ansiblesafe-v0.0.5-linux-amd64.tar.gz
tar -zxvf ansiblesafe-v0.0.5-linux-amd64.tar.gz
curl -OL https://github.com/tosin2013/ansiblesafe/releases/download/v0.0.6/ansiblesafe-v0.0.6-linux-amd64.tar.gz
tar -zxvf ansiblesafe-v0.0.6-linux-amd64.tar.gz
chmod +x ansiblesafe-linux-amd64
sudo mv ansiblesafe-linux-amd64 /usr/local/bin/ansiblesafe

Expand All @@ -110,18 +112,18 @@ sudo mv ansiblesafe-linux-amd64 /usr/local/bin/ansiblesafe
```


### How to use it
**Configure additional variables**
```
pip3 install -r requirements.txt
python3 load-variables.py
```

List inventory
**List inventory**
```
ansible-navigator inventory --list -m stdout --vault-password-file $HOME/.vault_password
```

Deploy KVM Host
**Deploy KVM Host**
```
$ ssh-agent bash
$ ssh-add ~/.ssh/id_rsa
Expand Down
59 changes: 2 additions & 57 deletions docs/quick_start.rst
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ The first step is to get RHEL 9 based operating system installed on your hardwar
Suppoted Operating Systems
========================

`Fedora 37 <https://getfedora.org/>`_
`Fedora 38 <https://getfedora.org/>`_
---------
Make sure the following packages are installed on your system before startng the install::

Expand All @@ -24,7 +24,7 @@ Make sure the following packages are installed on your system before startng the
sudo dnf install git vim unzip wget bind-utils python3-pip tar util-linux-user gcc python3-devel podman ansible-core make -y


`Rocky 8.7 <https://rockylinux.org//>`_
`Rocky 8.8 <https://rockylinux.org//>`_
---------

Make sure the following packages are installed on your system before startng the install::
Expand Down Expand Up @@ -52,58 +52,3 @@ Make sure the following packages are installed on your system before startng the
Make sure the following packages are installed on your system before startng the install::

sudo dnf install git vim unzip wget bind-utils python3-pip tar util-linux-user podman ansible-core make -y

The qubinode-installer
=========================

Download and extract the qubinode-installer as a non root user::

cd $HOME
wget https://github.com/Qubinode/qubinode-installer/archive/master.zip
unzip master.zip
rm master.zip
mv qubinode-installer-master qubinode-installer

If you would like to develop the qubinode-installer you can clone the repo::

YOUR_ID=githubid
git clone https://github.com/${YOUR_ID}/qubinode-installer.git
cd qubinode-installer

Qubinode Setup
===============

The below commands ensure your system is setup as a KVM host.
The qubinode-installer needs to run as a regular user.

* setup - ensure your username is setup for sudoers
* rhsm - ensure your rhel system is registered to Red Hat
* ansible - ensure your rhel system is setup for to function as a ansible controller
* host - ensure your rhel system is setup as a KVM host

Validate sudo user for admin::

$ sudo cat /etc/sudoers | grep admin
admin ALL=(ALL) NOPASSWD: ALL
$ sudo su - root
$ curl -OL https://gist.githubusercontent.com/tosin2013/385054f345ff7129df6167631156fa2a/raw/b67866c8d0ec220c393ea83d2c7056f33c472e65/configure-sudo-user.sh
$ chmod +x configure-sudo-user.sh
$ ./configure-sudo-user.sh admin
$ sudo su - admin


Start The Qubinode Installer::

cd ~/qubinode-installer
./qubinode-installer -m setup
./qubinode-installer -m rhsm
./qubinode-installer -m ansible
./qubinode-installer -m host


At this point you should be able to acces the RHEL system via the cockpit web interface on
* https://SERVER_IP:9090


See the `Qubinode Overview <https://qubinode-installer.readthedocs.io/en/latest/index.html>`_ for more information on the diffent deployment options available.

0 comments on commit 9b9ab9d

Please sign in to comment.