scantron icon indicating copy to clipboard operation
scantron copied to clipboard

Console Install

Open AloneAndUnknown opened this issue 2 years ago • 5 comments

having an issue with the console install. after running this command

ansible-playbook console.yml -u masscan --become --private-key=/home/masscan/.ssh/id_rsa

TASK [console : Install specified packages. pkg={{ install_packages }}, state=latest] ***************************************************************************************************************************** fatal: [Blacked out IP]: FAILED! => { "changed": false }

MSG:

No package matching 'python-virtualenv' is available

The package python3-virtualenv is installed... Not sure where i need to change the code to python3 instead of python.... or if i even need to do that? should i just continue?

AloneAndUnknown avatar Mar 25 '22 02:03 AloneAndUnknown

found it in roles/console/var.

But im going through dependency HELL!

AloneAndUnknown avatar Mar 26 '22 15:03 AloneAndUnknown

note, the docs say to use 18.04 and my experience so far is that it works with that i have noticed (and it could be because im using windows and virtualbox) that making sure system time is accurate and UTC is important

ive been working on some tweaks for getting console to work on 20.04: remove some warnings from ansible:

  • todo: figure out ansible warning for no_log / no_password_changes on new db user task
  • ports as strings instead of integers
  • install acl package for writing to /tmp
  • warn:no for default nginx file cleanup task

use chrony instead of ntp use a variable for ubuntu_version use a variable for python_version use ubuntu_version variable for postgress repo addition switch to python3-venv instead of python3-virtualenv (use python_version)

keep an eye on dependencies between:

  • python version and pygraphviz version
  • postgresql stuff (i havent started this yet, but it doesnt look fun)

consider the following: using postgresql_version version to easily switch from 12 to 14

  • welcome to the gates of dependency hell

using later versions for django stuff

  • if you thought you were in hell a minute ago...mwahahaha

rinse and repeat the whole process for

  • ubuntu 21.10 and python3.10
  • other operating systems?

dingusgh avatar Mar 27 '22 16:03 dingusgh

Im going to fire up ubuntu 18 and see if that can fix my woes. I got pretty far but i threw in the towel last night when i got down to python versioning and pygraphviz. pygraphviz just seemed to conk out on compiling a file. I think it has something to do with ubuntu 20 just wanting to use python3.8 even though 3.6 is installed and i linked python3 to python3.6 in usr/bin. I about threw the laptop at that point and went to bed. now you come in here giving me hope.... I dont know... but. ill give it a shot :)

AloneAndUnknown avatar Mar 27 '22 21:03 AloneAndUnknown

my test environment: virtualbox on windows download 20.04.4 iso from ubuntu create vm called deployer with 2048 ram instead of 1024 switch network from NAT to bridged launch vm all defaults except at the end, check the box for openssh server allow it to do the updates and then remove the install disk and reboot repeat this again for console and engine

while in deployer VM: install chrony and check proper time configured run apt update and upgrade generate ssh key add account to sudoers.d

echo 'USERNAME ALL=(ALL) NOPASSWD: ALL' | sudo tee /etc/sudoers.d/USERNAME

install ansible git clone scantron run initial_setup script scp pub key to authorized_keys on console/engine

cat ~/.ssh/id_rsa.pub | ssh -t USERNAME@IPADDRESS "mkdir -p ~/.ssh ; cat - >> ~/.ssh/authorized_keys"

while on console/engine add account to sudoers.d

echo 'USERNAME ALL=(ALL) NOPASSWD: ALL' | sudo tee /etc/sudoers.d/USERNAME

install chrony and check proper time configured note, the goal is to do the bare minimum manual configurations here we should let ansible playbook handle the rest poweroff the boxes and clone them generate new MACs when cloning and use full clone option use clones during testing

always double check the system time after starting up a VM! restart chronyd if you have to, but wait 5 seconds for it to fetch updated time

sudo service chronyd restart

dingusgh avatar Mar 28 '22 00:03 dingusgh

ok, great news, i got it to work! https://github.com/dingusgh/scantron/tree/main-20.04

dingusgh avatar Mar 29 '22 02:03 dingusgh