Last active
October 9, 2018 03:29
-
-
Save celsoagra/b6f86abaadd3c508e697d820a5675c77 to your computer and use it in GitHub Desktop.
Consul Installation
This file contains hidden or 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
# /home/celsoagra/ws-ati/procempa/consul/config/environments/<env>.rb | |
config.action_mailer.smtp_settings = { | |
:address => ENV['SMTP_ADDRESS'], | |
:port => ENV['SMTP_PORT'], | |
:enable_starttls_auto => true, | |
:ssl => false | |
} |
This file contains hidden or 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://consul_docs.gitbooks.io/docs/content/en/getting_started/prerequisites/linux.html | |
adduser consul | |
apt-get update | |
# https://nodejs.org/en/download/package-manager/ | |
apt-get install -y build-essential libpq-dev postgresql-client nodejs imagemagick sudo libxss1 libappindicator1 libindicator7 unzip memcached | |
# RVM | |
# http://rvm.io/ | |
# https://www.linuxquestions.org/questions/linux-software-2/unable-to-connect-to-keys-gnupg-net-838576/ | |
# OR --keyserver keyserver.ubuntu.com | |
gpg --keyserver hkp://keys.gnupg.net --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3 7D2BAF1CF37B13E2069D6956105BD0E739499BDB | |
\curl -sSL https://get.rvm.io | bash -s stable --ruby=2.3.2 | |
addgroup consul rvm | |
su - consul | |
rvm install ruby 2.3.2 | |
# Bundler | |
# https://github.com/bundler/bundler | |
gem install bundler | |
# https://www.calhoun.io/how-to-install-postgresql-9-5-on-ubuntu-16-04/ | |
apt-get update | |
apt-get install postgresql postgresql-contrib | |
ALTER USER postgres WITH ENCRYPTED PASSWORD 'postgres'; | |
CREATE DATABASE consul; | |
GRANT ALL PRIVILEGES ON DATABASE consul TO postgres; | |
nano /etc/postgresql/9.5/main/pg_hba.conf | |
local all postgres md5 | |
service postgresql restart | |
# https://github.com/consul/consul/blob/master/Dockerfile | |
# https://github.com/Procempa/consul/blob/master/Dockerfile | |
# https://github.com/omniauth/omniauth-openid | |
# https://github.com/consul/consul | |
# https://consul_docs.gitbooks.io/docs/content/en/features/oauth.html | |
git clone https://github.com/consul/consul.git | |
cd consul | |
bundle install | |
cp config/database.yml.example config/database.yml | |
cp config/secrets.yml.example config/secrets.yml | |
bin/rake db:create | |
bin/rake db:migrate | |
bin/rake db:dev_seed | |
rake db:setup | |
# Run the app locally: | |
bin/rails s |
This file contains hidden or 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
# BASEADO EM https://consul_docs.gitbooks.io/docs/content/en/getting_started/prerequisites/linux.html | |
#CRIAR USUARIO CONSUL | |
adduser <usuario_consul> | |
#ATUALIZAR SISTEMA | |
apt-get update | |
#INSTALAR NODEJS | |
curl -sL https://deb.nodesource.com/setup_8.x | sudo -E bash - | |
# INSTALAR PACOTES | |
sudo apt-get install -y build-essential libpq-dev postgresql-client nodejs imagemagick sudo libxss1 libappindicator1 libindicator7 unzip memcached | |
#INSTALAR O GIT | |
sudo apt-get install git | |
#INSTALAR O RUBY 2.3.2 COMO USUARIO LOCAL | |
gpg --keyserver hkp://keys.gnupg.net --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3 7D2BAF1CF37B13E2069D6956105BD0E739499BDB | |
curl -L https://get.rvm.io | sudo bash -s stable | |
sudo usermod -a -G rvm <usuario_consul> | |
su - <usuario_consul> | |
rvm install 2.3.2 | |
#INSTALAR BUNDLER (USUARIO LOCAL) | |
gem install bundler | |
#CONFIGURAR CONSUL | |
git clone https://github.com/consul/consul.git | |
cd consul | |
bundle install | |
cp config/database.yml.example config/database.yml | |
cp config/secrets.yml.example config/secrets.yml | |
bin/rake db:create | |
bin/rake db:migrate | |
bin/rake db:dev_seed | |
rake db:setup |
This file contains hidden or 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://community.openproject.com/topics/7951 | |
https://github.com/m0n9oose/omniauth_openid_connect | |
https://consul_docs.gitbooks.io/docs/content/en/features/oauth.html | |
# install apache | |
https://www.digitalocean.com/community/tutorials/how-to-deploy-a-rails-app-with-passenger-and-apache-on-ubuntu-14-04 |
This file contains hidden or 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
# -*- mode: ruby -*- | |
# vi: set ft=ruby : | |
# All Vagrant configuration is done below. The "2" in Vagrant.configure | |
# configures the configuration version (we support older styles for | |
# backwards compatibility). Please don't change it unless you know what | |
# you're doing. | |
Vagrant.configure("2") do |config| | |
# Servidor do Gestão DB | |
config.vm.define "consul" do |consul| | |
consul.vm.hostname = 'consul' | |
consul.vm.box = "ubuntu/trusty64" | |
consul.vm.network :private_network, ip: "192.168.10.2" | |
consul.vm.provider :virtualbox do |v| | |
v.customize ["modifyvm", :id, "--memory", 2048] | |
end | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment