Skip to content

Instantly share code, notes, and snippets.

@hemna
Last active December 21, 2018 18:05
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save hemna/196f8b06125c094853d5cbbd00342563 to your computer and use it in GitHub Desktop.
Save hemna/196f8b06125c094853d5cbbd00342563 to your computer and use it in GitHub Desktop.
#!/bin/bash
# script to setup my crowbar host environment after it's up
# Run with:
# wget -O setuphost.sh https://gist.github.com/hemna/196f8b06125c094853d5cbbd00342563/raw | bash
mkdir ~/.ssh
cat > ~/.ssh/config <<'_EOF_'
Host github.com
StrictHostKeyChecking no
_EOF_
# Pull down my personal set of .vim, .gitconfig, etc dirs
cd ~
wget -qO - https://raw.githubusercontent.com/hemna/.dotfiles/master/bootstrap.sh | bash
# Since SLE doesn't have a package for tig
# we pull the repo and build it manually. it's quick.
cd ~
git clone https://github.com/jonas/tig
cd tig
./autogen.sh && ./configure && make && make install
cd ~
# get the crowbar-openstack repo for dev work
git clone git@github.com:hemna/crowbar-openstack.git
cd ~/crowbar-openstack
git co -b ses origin/ses
git co -b walt-ses origin/walt-ses
# get the crowbar bounce script
cd ~
wget -O bounce.sh https://gist.github.com/hemna/1ecd40f42497ab6b2bc05a0a8747a661/raw
chmod 755 bounce.sh
# need to patch the /opt/dell/crowbar
zypper in -y patch
mkdir tmp
cd tmp
cat > assets.rb.patch <<'__EOF__'
--- assets.rb 2018-11-13 19:15:25.536504448 +0000
+++ assets.rb.patched 2018-11-13 19:15:44.760743124 +0000
@@ -21,6 +21,7 @@
config.assets.precompile = [
/vendor\.(css|js)$/,
/application\.(css|js)$/,
+ /yaml\.(css|js)$/,
/ie\.(css|js)$/,
/branding\.(css|js)$/,
/installer\.(css|js)$/,
__EOF__
patch -i assets.rb.patch /opt/dell/crowbar_framework/config/initializers/assets.rb
cd ~
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment