-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathprovision-ubuntu
executable file
·115 lines (86 loc) · 4.2 KB
/
provision-ubuntu
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
#!/bin/bash
if [ ! -d ~/workspace ]; then
mkdir -p ~/workspace
fi
cp git-prompt.sh ~/.git-prompt.sh
echo 'source ~/.git-prompt.sh' >> ~/.bashrc
echo 'export PS1="\[\033[36m\]\u\[\033[m\]@\[\033[32m\]\h \[\033[33;1m\]\w\[\033[m\] <$(__git_ps1 " (%s)")>\n$ "' >> ~/.bashrc
echo 'export GOPATH=$HOME/go'>> ~/.bashrc
echo 'export PATH=$PATH:$GOROOT/bin:$GOPATH/bin'>> ~/.bashrc
source ~/.bashrc
#install software I use
sudo apt-get -y update
sudo apt-get -y install jq build-essential ruby ruby-dev libxml2-dev libsqlite3-dev libxslt1-dev libpq-dev libmysqlclient-dev zlib1g-dev unzip whois make
sudo gem install nokogiri -- --use-system-libraries --with-xml2-include=/usr/include/libxml2
sudo gem install bundler
echo "install: --no-ri --no-rdoc
update: --no-ri --no-rdoc
" >~/.gemrc
sudo gem install -V --no-ri --no-rdoc bosh_cli
#sudo gem install -V --no-ri --no-rdoc bosh_cli_plugin_micro
#sudo gem install -V --no-ri --no-rdoc bosh_cli_plugin_aws
#install Spruce
curl -s https://api.github.com/repos/geofffranks/spruce/releases/latest | jq -r ".assets[] | select(.name | test(\"${spruce_type}\")) | .browser_download_url" | xargs wget -O /tmp/spruce.tar.gz
tar zxvf /tmp/spruce.tar.gz -C /tmp/ --strip-components 1
chmod +x /tmp/spruce
sudo mv /tmp/spruce /usr/local/bin
#could improve this command by selecting single spruce file and extracting directly to /usr/local/bin
#Install CF CLI
wget -O /tmp/cli.tar.gz "https://cli.run.pivotal.io/stable?release=linux64-binary&source=github"
sudo tar -zxvf /tmp/cli.tar.gz -C /usr/local/bin
#Install cf gemfire plugin
wget -O "cf-gemfire-cli-darwin-amd64" --post-data="" --header="Authorization: Token T31yH8NCcXa3x4Q9S5p_" https://network.pivotal.io/api/v2/products/p-gemfire/releases/1634/product_files/4216/download
chmod a+x ./cf-gemfire-cli-darwin-amd64
cf install-plugin ./cf-gemfire-cli-darwin-amd64 -f
#Install https://github.com/krujos/usagereport-plugin
cf add-plugin-repo CF-Community http://plugins.cloudfoundry.org/
cf install-plugin 'Usage Report' -r CF-Community
#install cf targets plugin
cf add-plugin-repo CF-Community http://plugins.cloudfoundry.org/
cf install-plugin targets -r CF-Community
#install the silver Searcher
apt-get install -y silversearcher-ag
# bosh
wget https://s3.amazonaws.com/bosh-cli-artifacts/bosh-cli-2.0.28-linux-amd64
chmod +x ~/Downloads/bosh-cli-*
sudo mv ~/Downloads/bosh-cli-* /usr/local/bin/bosh
# bosh-init
cd /usr/local/bin
sudo wget https://s3.amazonaws.com/bosh-init-artifacts/bosh-init-0.0.99-linux-amd64
sudo mv bosh-init-0.0.99-linux-amd64 bosh-init
#uaac
sudo gem install cf-uaac
#install azure cli
sudo apt-get install -y nodejs
sudo apt-get install -y npm
sudo npm install -g azure-cli
#install AWS cli
curl "https://s3.amazonaws.com/aws-cli/awscli-bundle.zip" -o "awscli-bundle.zip"
unzip awscli-bundle.zip
sudo ./awscli-bundle/install -i /usr/local/aws -b /usr/local/bin/aws
#install mvn java 1.8
#check what version of java is installed
#http://stackoverflow.com/questions/7334754/correct-way-to-check-java-version-from-bash-script
sudo add-apt-repository -y ppa:webupd8team/java
sudo apt-get -y update
echo debconf shared/accepted-oracle-license-v1-1 select true | sudo debconf-set-selections
echo debconf shared/accepted-oracle-license-v1-1 seen true | sudo debconf-set-selections
sudo apt-get -y install maven oracle-java8-installer
sudo apt-get install oracle-java8-set-default
#Install GFSH (Gemfire Command line tool)
curl -X POST --header "Authorization: Token T31yH8NCcXa3x4Q9S5p_" https://network.pivotal.io/api/v2/products/pivotal-gemfire/releases/478/eula_acceptance
wget -O "/tmp/gemfire.deb" --post-data="" --header="Authorization: Token T31yH8NCcXa3x4Q9S5p_" https://network.pivotal.io/api/v2/products/pivotal-gemfire/releases/478/product_files/2542/download
sudo dpkg -i /tmp/gemfire.deb
#setup git user / ssh key
cp ./keys/id_rsa_github_env ~/.ssh/id_rsa_github_env
eval "$(ssh-agent -s)"
ssh-add ~/.ssh/id_rsa_github_env
#install fly (concourse client)
wget -O fly "https://ci.concourse.ci/api/v1/cli?arch=amd64&platform=linux"
chmod +x fly
sudo mv fly /usr/local/bin
./gitsetup.sh
#Install Luan's Vim Config
git clone http://github.com/haydonryan/vimfiles.git ~/.vim
~/.vim/install
echo 'set mouse-=a' >>~/.vimrc.local