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 | |
# copy_kubeconf_rancher.sh | |
HOSTLIST="master01 master02 master03" | |
for h in $HOSTLIST | |
do | |
scp kube_config_rancher-cluster.yml ubuntu@${h}:/home/ubuntu/ | |
ssh ubuntu@${h} echo "export KUBECONFIG=/home/ubuntu/kube_config_rancher-cluster.yml" \>\> .profile | |
done |
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 | |
# install_rancher.sh | |
echo "before : " | |
helm repo list | |
echo "" | |
echo "repository add : " | |
helm repo add rancher-latest https://releases.rancher.com/server-charts/latest |
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 | |
# install_nginx_ubu16.sh | |
# | |
#usage) | |
# chmod +x install_nginx_ubu16.sh | |
# sudo bash ./install_nginx_ubu16.sh | |
listfile=/etc/apt/sources.list.d/nginx.list | |
if [ ! -f $listfile ]; then |
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
user nginx; | |
worker_processes 1; | |
error_log /var/log/nginx/error.log warn; | |
pid /var/run/nginx.pid; | |
events { | |
worker_connections 1024; | |
} | |
http { | |
include /etc/nginx/mime.types; | |
default_type application/octet-stream; |
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 | |
# install_rails5_2.sh | |
# active admin app | |
sudo apt-get update | |
sudo apt-get install -y ruby sqlite3 libsqlite3-dev | |
sudo apt-get install -y build-essential liblzma-dev patch ruby-dev zlib1g-dev | |
sudo gem install rails | |
APPNAME="app001" |
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
$ dpkg -l gitlab-ce | |
Desired=Unknown/Install/Remove/Purge/Hold | |
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend | |
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad) | |
||/ Name Version Architecture Description | |
+++-========================-=================-=================-====================================================== | |
ii gitlab-ce 11.5.3-ce.0 amd64 GitLab Community Edition (including NGINX, Postgres, R | |
$ |
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
$ sudo apt update | |
$ sudo apt upgrade | |
$ which snap | |
/usr/bin/snap | |
$ sudo snap install conjure-up --classic | |
$ sudo snap install lxd | |
$ /snap/bin/lxd init | |
Would you like to use LXD clustering? (yes/no) [default=no]: | |
Do you want to configure a new storage pool? (yes/no) [default=yes]: | |
Name of the new storage pool [default=default]: |
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 | |
# install_docker_compose.sh | |
# | |
# https://docs.docker.com/compose/install/#install-compose | |
# https://docs.docker.com/compose/completion/#compose-documentation | |
# | |
sudo curl -L "https://github.com/docker/compose/releases/download/1.23.1/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose | |
sudo chmod +x /usr/local/bin/docker-compose | |
sudo curl -L https://raw.githubusercontent.com/docker/compose/1.23.1/contrib/completion/bash/docker-compose -o /etc/bash_completion.d/docker-compose |
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
source 'https://rubygems.org' | |
git_source(:github) { |repo| "https://github.com/#{repo}.git" } | |
ruby '2.3.1' | |
# Bundle edge Rails instead: gem 'rails', github: 'rails/rails' | |
gem 'rails', '~> 5.2.2' | |
# Use postgresql as the database for Active Record | |
gem 'pg', '>= 0.18', '< 2.0' | |
# Use Puma as the app server |
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
NAME=myapp | |
VERSION=v101 | |
HOST_PORT=3000 | |
CONT_PORT=3000 | |
container=`sudo docker ps -a -q` | |
image=`sudo docker images | awk '/^<none>/ { print $$3 }'` | |
build: | |
sudo docker build -t $(NAME):$(VERSION) . |