Terraforming my Droplet

No more manual config I want to run my droplet with my blog and all my games and silly one-off web apps without ever touching it manually. This would allow me to destroy and rebuild it on a whim, using config as code, CI/CD, etc.. I recently messed around with user access and locked myself out of my droplet. Around the same time, my draft blog stopped updating properly. The update failure is likely a file ownership problem....

January 18, 2020

Syncing Public GitLab Projects to GitHub

set up your access and tools You’ll need python/pip/virtualenv git 1.7.3 or newer (for the hub tool) a GitHub ssh key configured on your GitHub account a GitLab ssh key configured on your GitLab account a GitLab API token the hub tool clone the projects usage 1 2 3 4 5 6 export GL_TOKEN='yourtokenhere' export GL_URL='https://gitlab.com' virtualenv -p python3 venv . venv/bin/activate pip install python-gitlab python main.py main....

December 30, 2019

All the RH notes  [draft]

linking files and the inode identifies files permissions ownership date and time stamps paths to data on file system everything about the file except for the file name itself 1 2 someuser@somehost ~/workspace/someuser_/redhat_training > ls -li asdf 139117524 -rw-rw-r--. 1 someuser someuser 0 Nov 26 16:23 asdf flag -i shows inode id 1 = one name pointing to that file 1 2 3 4 5 someuser@somehost ~/workspace/someuser_/redhat_training > ln asdf asdf2 someuser@somehost ~/workspace/someuser_/redhat_training > ls -li total 0 139117524 -rw-rw-r--....

December 12, 2019

RH notes 6  [draft]

configuring networking from the command line nmcli : interface to the network manager daemon /etc/sysconfig/network-scripts : nmcli con sho : show connections watch some videos on DNS/networking, knowledge still feels kind of loose nmcli con add con-name foo ifname enp1s0 type ethernet : add a network connection with: name: foo ifname: enp1s0 type: ethernet editing network configuration files ls -l /etc/sysconfig/network-scripts/ifcfg-* : network config config files configuring hostnames and name resolution hostname...

December 12, 2019

RH notes 5  [draft]

maintaining accurate time it’s ok to have the wrong time as long as everyone has the wrong time timedatectl : see system time user@host ~ > timedatectl Local time: Tue 2019-12-10 17:11:32 CST Universal time: Tue 2019-12-10 23:11:32 UTC RTC time: Tue 2019-12-10 23:11:32 Time zone: America/Chicago (CST, -0600) NTP enabled: yes NTP synchronized: yes RTC in local TZ: no DST active: no Last DST change: DST ended at Sun 2019-11-03 01:59:59 CDT Sun 2019-11-03 01:00:00 CST Next DST change: DST begins (the clock jumps one hour forward) at Sun 2020-03-08 01:59:59 CST Sun 2020-03-08 03:00:00 CDT...

December 10, 2019

RH notes 4  [draft]

monitoring process activity load average is : 1 minute, 5 minutes, 15 minutes moving exponential average 1 2 user@host ~/workspace/cloudtv_/simulacrations > uptime 17:12:56 up 80 days, 8:57, 4 users, load average: 0.51, 0.38, 0.34 figure out how many logical CPUs you have, and divide the load average by that number, yield is percent of load over period of time. 100% is fully loaded, more is overloaded. lscpu : see how many CPUs you have I have 4...

December 7, 2019

RH notes 3  [draft]

monitoring and managing processes zombie process: when child is done it frees up its reasources except for its process ID; then it’s just an etry in the parent’s process table; parent wakes up and clears process table stopped is different from terminated PTS : pseudo terminal session ps -ef bash shell running inside terminal emulator program, and allocated a pt PID1 is systemd top controlling jobs use & to run process in background, which allows it to write to stdout and lets you run additional processes...

December 3, 2019

RH notes 2  [draft]

controlling access to files ‘-’ : normal file ’d’ : directory ‘l’ : link permissions evaluated by: user > group > other execute on directory means the content of that directory can be accessed chmod chown only the root user can transfer ownership as separator between owner and group for chown, can use :newgroup for just group; newuser: ? or newuser ? for just user ....

December 2, 2019

RH notes  [draft]

linking files and the inode identifies files permissions ownership date and time stamps paths to data on file system everything about the file except for the file name itself 1 2 someuser@somehost ~/workspace/someuser_/redhat_training > ls -li asdf 139117524 -rw-rw-r--. 1 someuser someuser 0 Nov 26 16:23 asdf flag -i shows inode id 1 = one name pointing to that file 1 2 3 4 5 someuser@somehost ~/workspace/someuser_/redhat_training > ln asdf asdf2 someuser@somehost ~/workspace/someuser_/redhat_training > ls -li total 0 139117524 -rw-rw-r--....

November 26, 2019