Difference between revisions of "Automation Analytics"

From tannerjc wiki
Jump to: navigation, search
(fullstack dev setup)
Line 115: Line 115:
sudo usermod -aG docker vagrant
sudo usermod -aG docker vagrant

Revision as of 13:33, 1 June 2020

frontend dev setup

use nvm to install and use node 10.15
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.35.3/install.sh | bash
source ~/.bashrc
nvm install 10.15
nvm use 10.15
clone the various repos
mkdir -p ~/workspace/github/RedHatInsights
git clone https://github.com/RedHatInsights/tower-analytics-frontend ~/workspace/github/RedHatInsights/tower-analytics-frontend
git clone https://github.com/RedHatInsights/insights-proxy ~/workspace/github/RedHatInsights/insights-proxy
fix the frontend spandx config
diff --git a/config/spandx.config.js b/config/spandx.config.js
index c40e554..611bc40 100644
--- a/config/spandx.config.js
+++ b/config/spandx.config.js
@@ -9,6 +9,5 @@ module.exports = {
         '/apps/automation-analytics': { host: `https://${localhost}:8002` },
         '/ansible/automation-analytics': { host: `https://${localhost}:8002` },
         '/beta/ansible/automation-analytics': { host: `https://${localhost}:8002` },
-        '/beta/config': { host: `http://${localhost}:8889` }
set the hosts file
cd ~/workspace/github/RedHatInsights/insights-proxy
sudo ./scripts/patch-etc-hosts.sh

start the proxy [requires docker or podman-docker]
cd ~/workspace/github/RedHatInsights/insights-proxy
SPANDX_CONFIG=~/workspace/github/RedHatInsights/tower-analytics-frontend/config/spandx.config.js ./scripts/run.sh
open the "prod" url


fullstack dev setup

The backend stack is in a private repo https://github.com/RedHatInsights/tower-analytics-backend

The stack is heavily reliant on docker-compose to spin up and podman-compose will fail if used.

The easypath is

  • vagrant
  • ubuntu 1804
  • docker-engine
  • docker-compose
F31 host config
dnf -y install nfs-utils
systemctl enable nfs-server
systemctl enable rpcbind
systemctl start nfs-server
systemctl start rpcbind

rpcinfo -p | awk '{print $4}' | fgrep -v port | sort -u | xargs -I {} firewall-cmd --zone=libvirt --permanent --add-port={}/tcp
rpcinfo -p | awk '{print $4}' | fgrep -v port | sort -u | xargs -I {} firewall-cmd --zone=libvirt --permanent --add-port={}/udp
firewall-cmd --zone=libvirt --add-service=nfs --permanent
firewall-cmd --zone=libvirt --add-service=rpc-bind --permanent
firewall-cmd --reload
# -*- mode: ruby -*-
# vi: set ft=ruby :

Vagrant.configure("2") do |config|
  config.vm.box = "generic/ubuntu1804"
  config.vm.synced_folder ".", "/vagrant", type: "nfs", nfs_udp: false
  config.vm.provider :libvirt do |libvirt|
    libvirt.cpus = 2
    libvirt.memory = 4096


# https://docs.docker.com/engine/install/ubuntu/

sudo apt-get update
sudo apt-get install -y \
    apt-transport-https \
    ca-certificates \
    curl \
    gnupg-agent \

curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
sudo add-apt-repository \
   "deb [arch=amd64] https://download.docker.com/linux/ubuntu \
   $(lsb_release -cs) \
sudo apt-get update
sudo apt-get install -y docker-ce docker-ce-cli containerd.io
sudo apt-get install -y docker-compose

sudo usermod -aG docker vagrant