DevOps-Bot UI

User Guide: Using the DevOps-Bot UI

The DevOps-Bot UI provides a graphical interface for managing and automating tasks. The steps to access and use the UI vary depending on how you're running DevOps-Bot. Below is a comprehensive guide to get you started.

Running DevOps-Bot in a Container

Accessing the UI:

  1. Copy the public IP address of the server or instance where the container is running.
  2. Open your browser and navigate to:
    http://<PUBLIC_IP>:4102

    Replace <PUBLIC_IP> with the actual public IP address or domain of your container.

    If you're using a domain, replace <PUBLIC_IP> with your domain name.

For more information about setting up and running DevOps-Bot in a container, refer to the installation guide: Container Installation Guide.

Running DevOps-Bot on Linux

Steps to Install and Access DevOps-Bot UI

Create an Installation Script

Save the following script as install_devops_bot.sh:


#!/bin/bash

# Exit immediately if any command fails
set -e

# Function to display a stage
function show_stage() {
  echo -e "\n\033[1;32m>>> $1\033[0m"
}

# Function to install a package
function install_package() {
  if ! command -v "$1" &>/dev/null; then
    show_stage "Installing $1..."
    if [ "$PACKAGE_MANAGER" == "apt-get" ]; then
      apt-get install -y "$2"
    elif [ "$PACKAGE_MANAGER" == "yum" ] || [ "$PACKAGE_MANAGER" == "dnf" ]; then
      $PACKAGE_MANAGER install -y "$2"
    else
      echo "Unsupported package manager."
      exit 1
    fi
  else
    echo "$1 is already installed."
  fi
}

# Step 1: Detect the operating system and package manager
show_stage "Checking operating system..."
if [ -f "/etc/debian_version" ]; then
  PACKAGE_MANAGER="apt-get"
  update_command="apt-get update -y"
elif [ -f "/etc/os-release" ]; then
  . /etc/os-release
  if [[ "$ID" == "amzn" ]]; then
    # Amazon Linux
    PACKAGE_MANAGER="yum"
    update_command="yum update -y"
  elif [[ "$ID_LIKE" == *"rhel"* ]] || [[ "$ID" == "centos" ]] || [[ "$ID" == "fedora" ]]; then
    # RHEL-based distributions
    if command -v dnf &>/dev/null; then
      PACKAGE_MANAGER="dnf"
      update_command="dnf update -y"
    else
      PACKAGE_MANAGER="yum"
      update_command="yum update -y"
    fi
  else
    echo "Unsupported operating system."
    exit 1
  fi
else
  echo "Unsupported operating system."
  exit 1
fi

# Step 2: Update and install prerequisites
show_stage "Updating package list and installing prerequisites..."
eval "$update_command"
install_package "wget" "wget"
install_package "pip3" "python3-pip"

# Step 3: Download the .whl file
WHL_URL="https://raw.githubusercontent.com/Devops-Bot-Official/DOB-Installation-Package/master/devops_bot-0.1-py3-none-any.whl"
WHL_FILE="devops_bot-0.1-py3-none-any.whl"

show_stage "Downloading the package..."
wget -q "$WHL_URL" -O "$WHL_FILE"

# Step 4: Install the package
show_stage "Installing the package..."
pip3 install "$WHL_FILE"

# Step 5: Install Flask-SocketIO (if needed)
show_stage "Installing Flask-SocketIO..."
pip3 install flask_socketio

# Step 6: Clean up
show_stage "Cleaning up..."
rm -f "$WHL_FILE"

# Final message
show_stage "Installation complete!"
      
Run the Installation Script

chmod +x install_devops_bot.sh
./install_devops_bot.sh
      
Access the UI

Start the service:

systemctl start devops-bot

Navigate to your browser and open:

http://<YOUR_SERVER_IP>:4102

UI Registration and Login

Registration:
  1. On the UI homepage, navigate to the Registration Page.
  2. Fill in the required fields:
    • Name
    • Username
    • Password
    • Email
  3. Submit the registration form.
Login:
  1. Return to the Login Page and enter your registered username and password.
  2. When prompted for a token:
    • Go to the CLI and run the following command:
    • dob generate-token --username <your_username>
    • Copy the generated Base64 token and paste it into the token field on the login page.
Successful Login:

After providing the token, you will be logged into the DevOps-Bot UI.

More Information

This guide ensures that users on any platform (container or Linux-based systems) can set up and use the DevOps-Bot UI seamlessly.


Installation Steps PDF Reference for Devops-Bot UI

For detailed installation steps, please refer to the PDF documentation:


Your browser does not support PDFs. Download the PDF.