Skip to content

Instantly share code, notes, and snippets.

View haydonryan's full-sized avatar

Haydon Ryan haydonryan

View GitHub Profile
@haydonryan
haydonryan / download-releases.sh
Created September 17, 2024 16:39
Parse concourse deployment and download release blobs
#!/bin/bash
mkdir -p ../images/concourse
for i in {0..15} # Cap at 15 releases adjust as necessary
do
URL="$(bosh int \
-e bosh-1 \
-d concourse \
./concourse-bosh-deployment/cluster/concourse.yml \
-l ./concourse-bosh-deployment/versions.yml \
#/bin/bash
newfile () {
fname=$1
count=0
while [ -e "$fname" ]
do
# fname="$1.$((++count)).mp4"
fname="$(basename $1 .mp4).$((++count)).mp4"
done
@haydonryan
haydonryan / GPG Signed Commits
Last active February 17, 2018 16:42
Setting up Github GPG signing.
brew doctor
brew update
brew install -v gpg
gpg --full-generate-key
gpg --list-secret-keys --keyid-format LONG
# https://help.github.com/articles/generating-a-new-gpg-key/
sudo su - tempest-web -s /bin/bash -c 'psql tempest_production'
SELECT column_name, data_type
FROM information_schema.columns
WHERE table_name = 'uaa_configs';
SELECT id, hostname
FROM uaa_configs;
UPDATE uaa_configs
bosh --ca-cert /var/tempest/workspaces/default/root_ca_certificate target DIRECTOR-IP-ADDRESS
#!/bin/bash
set -e
if [[ ($# -ne 3) && ($# -ne 2) ]]
then echo "wrong number of arguments:"
echo "create_cert sys_domain app_domain"
exit 1
fi
sudo service tempest-web stop
sudo service tempest-web start
#you will have to enter the decryption passphrase after this.
sudo killall -HUP mDNSResponder;say DNS cache has been flushed
sudo killall -HUP mDNSResponder;sudo killall mDNSResponderHelper;sudo dscacheutil -flushcache;say MacOS DNS cache has been cleared
SSH to OMD and become root
Switch to postgres user
Execute psql
Log into tempest_production database
Execute:
UPDATE installs SET status='failed', finished_at='2017-05-04T13:58:39.620Z', finished=true WHERE id='23';

Turn on debug logging

/home/tempest-web/tempest/web/config/environments/production.rb
config.log_level = :info   -> config.log_level = :debug

Creates logs in: /tmp/logs