-sh-4.2$ ls
id_rsa_github2.pub id_rsa_github.pub
-sh-4.2$ ipa user-mod jhoblitt-comcam --sshpubkey="$(cat id_rsa_github.pub)"
-------------------------------
Modified user "jhoblitt-comcam"
-------------------------------
- update
/etc/resolv.conf
management forcomcam
cluster - copy foreman hostgroup(s) from
comcam-fp01
to production foreman instance - remove
10/8
addresses from/etc/hosts
onstargate
& comcam hosts - ensure that all comcam hosts + BMCs are configured for DHCP
- audit network scripts for extra static configuration. E.g. default gateways, rules, etc.
- audit iptable rules (expected to be disabled)
- disable puppetmaster on comcam-fp01; disable puppet agent on all other nodes (to prevent cached catalogs from being re-applied)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
### File managed with puppet ### | |
## Module: 'foreman' | |
# Database is managed by foreman::database::postgresql | |
production: | |
adapter: postgresql | |
database: foreman | |
username: foreman | |
password: "XXX" | |
pool: 5 |
- generate new ssh key pair to use as github deploy keys; install per site/pm deploy key on lsst-it/lsst-puppet-hiera-private repo
- stop local agent (service)
- cp in sshkey for hiera
- check /etc/hosts to see if puppet-master is resolvable
- remove enc configuration from puppet.conf
- change env to IT_1141_hiera_redux
- rm old code/hiera paths (due to dir path changes)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
strip_manifest() { | |
local manifest_id=${1?manifest id is required} | |
local base_url='https://raw.githubusercontent.com/lsst/versiondb/master/manifests' | |
curl -sSL "${base_url}/${manifest_id}.txt" \ | |
| awk '{ print $1 " " $2 }' \ | |
| sort > "${manifest_id}-sha1.txt" | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ARG BASE_IMAGE=lsstsqre/centos:7-stack-lsst_distrib-w_2019_17 | |
FROM $BASE_IMAGE | |
USER root | |
RUN yum install -y rh-git29 | |
RUN echo -e '#!/bin/bash\nsource scl_source enable rh-git29\n' > /etc/profile.d/rh-git29.sh | |
RUN chmod 0555 /etc/profile.d/rh-git29.sh | |
USER lsst |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
instance_id=<foo> | |
aws ec2 stop-instances --instance-ids $instance_id | |
#aws ec2 modify-instance-attribute --instance-id $instance_id --instance-type c4.xlarge | |
aws ec2 modify-instance-attribute --instance-id $instance_id --instance-type c5.xlarge | |
aws ec2 modify-instance-attribute --instance-id $instance_id --ena-support | |
aws ec2 start-instances --instance-ids $instance_id | |
aws ec2 describe-instances --filters "Name=tag:env_name,Values=jenkins-prod" --query 'Reservations[*].Instances[*].InstanceId,ImageId,Tags[?Key==`Name`].Value]' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
#set -e | |
set -o xtrace | |
for m in {4..10}; do | |
mon=$(printf "%02d" $m) | |
for d in {2..30}; do | |
day=$(printf "%02d" $d) | |
aws s3 rm --recursive "s3://eups.lsst.codes-backups/2017/${mon}/${day}" & |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Jenkins.instance.getItemByFullName("sqre/validate_drp").updateNextBuildNumber(1121) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# https://stackoverflow.com/questions/15965073/return-code-of-sed-for-no-match | |
# https://unix.stackexchange.com/questions/145402/regex-alternation-or-operator-foobar-in-gnu-or-bsd-sed | |
# POSIX ERE + GNU | |
echo " 13.0-10-g692d0a9 d_2017_09_14 " | sed -E '/^\s*([0-9.-]+g(\S+)|([0-9.]+)\+?[0-9]*).+/,${s//\2\3/;b};$Q1') | |
# pure POSIX ERE -- does not work on OSX | |
echo " 13.0-10-g692d0a9 d_2017_09_14 " | sed -E '/^[[:space:]]*[[:digit:].-]{1,}g([[:xdigit:]]{1,})[[:space:]]{1,}.*/!{/^[[:space:]]*([[:digit:]\.]{1,})(+[[:digit:]]{1,}){0,1}[[:space:]]{1,}.*/!b};s//\1/' | |
# python 2.7 / 3 compat -- can not be done on oneline? |