Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
vm com o pacote rpm -> ip: 104.131.223.206
10:49 AM <alexandreab> usuário: root
10:49 AM <alexandreab> senha: a se dempre
10:49 AM <alexandreab> arquivo rpm: /tmp/gitlab-spb_novo.el6.x86_64.rpm
10:50 AM <alexandreab> já instalei esse pacote em outra vm limpa (162.243.88.56)
104.131.223.206 - Criando RPM
162.243.88.56 - Instalando o RPM
Passos para 4 de setembro:
1. Gerar um RPM preparado para colocar o relative_url mas sem de fato estar configurado
2. Instalar e ver se esta funcionando
3. Aplicar as configuracoes do relative_url
4. Testar e ANOTAR as modificacoes para efetivar o relative_url
Desinstalar o RPM
$ gitlab-ctl uninstall
$ rpm -e gitlab
$ rm -rf /var/log/gitlab/ /opt/gitlab/ /etc/gitlab/ /var/opt/gitlab/
Adicionar as variaveis
<% if @env_enable %>
env:
enabled: <%= @env_enable %>
database_name: <%= single_quote(@env_database_name) %>
host: <%= single_quote(@env_database_host) %>
user: <%= single_quote(@env_database_user) %>
password: <%= single_quote(@env_database_password) %>
<% end %>
default['gitlab']['gitlab-rails']['env_enable'] = false
default['gitlab']['gitlab-rails']['env_database_name'] = nil
default['gitlab']['gitlab-rails']['env_database_host'] = nil
default['gitlab']['gitlab-rails']['env_database_user'] = nil
default['gitlab']['gitlab-rails']['env_database_password'] =nil
thiago@10.1.0.39
senha: a de sempre
OBS:
antes vamos instalar a versao 7.2.1 oficial do gitlab e testar o relative_url
-> no /etc/gitlab/gitlab.rb adicionamos a linha: gitlab_rails['internal_api_url'] = 'http://162.243.88.56/gitlab'
- o macartur mexeu nos arquivos:
-> files/gitlab-cookbooks/gitlab/templates/default/gitlab.yml.erb
-> descomentar a linha: relative_url_root: /gitlab
-> files/gitlab-cookbooks/gitlab/templates/default/unicorn.rb.erb
-> adicionar ENV['RAILS_RELATIVE_URL_ROOT'] = "/gitlab"
-> embedded/service/gitlab-rails/config/application.rb
-> descomentar a linha: config.relative_url_root = "/gitlab"
-> criar links simbolico:
-> mkdir /opt/gitlab/embedded/service/gitlab-rails/public/gitlab/
-> ln -s /opt/gitlab/embedded/service/gitlab-rails/public/assets/ /opt/gitlab/embedded/service/gitlab-rails/public/gitlab/
-
Formato do /etc/gitlab/gitlab.rb na instalacao do RPM
<<< INICIO
external_url 'http://10.1.0.39'
gitlab_rails['internal_api_url'] = 'http://127.0.0.1/gitlab'
gitlab-rails['env_enable'] = false
gitlab-rails['env_database_name'] = nil
gitlab-rails['env_database_host'] = nil
gitlab-rails['env_database_user'] = nil
gitlab-rails['env_database_password'] =nil
<<< FIM
Fix de nao baixar o omniauth-env: tem que adicionar qual a branch a baixar
gem "omniauth-env", :git => "https://github.com/colab-community/omniauth-env.git", :branch => "master"
rm -rf /opt/gitlab/embedded/service/gem/ruby/2.1.0/cache/bundler/git/omniauth-env-6b8383dc51b0fb0b9cdfeb6c8f48e91cfa718458
Em /opt/gitlab/embedded/service/gitlab-rails:
sudo ../../bin/bundle install
sudo /opt/gitlab/bin/gitlab-rake db:schema:load db:seed_fu
sudo gitlab-ctl reconfigure
sudo gitlab-ctl restart
Configuração do /etc/gitlab/gitlab.rb
<<< INICIO
external_url 'http://162.243.88.56'
gitlab_rails['internal_api_url'] = 'http://127.0.0.1:8090/gitlab'
nginx['enable'] = false
unicorn['enable'] = true
unicorn['port'] = 8091
postgresql['port'] = 5433
<<< FIM
<<< Configuracoes gitlab.rb do lappis
gitlab_rails['env_enable'] = true
gitlab_rails['env_database_name'] = 'colab'
gitlab_rails['env_database_host'] = '127.0.0.1'
gitlab_rails['env_database_user'] = 'colab'
gitlab_rails['env_database_password'] = 'colab'
gitlab_rails['omniauth_enabled'] = true
gitlab_rails['omniauth_allow_single_sign_on'] = true
gitlab_rails['omniauth_block_auto_created_users'] = false
gitlab_rails['gitlab_shell_ssh_port'] = 51122
<<< FIM
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment