Skip to content

Commit c834d1c

Browse files
author
Itxaka Serrano
committed
just use travis user for installing gitlab
1 parent 41bcece commit c834d1c

File tree

2 files changed

+29
-44
lines changed

2 files changed

+29
-44
lines changed

scripts/install_gitlab.sh

Lines changed: 27 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -1,35 +1,31 @@
11
#!/bin/bash
22
# install gitlab
3-
cd /home/git
4-
sudo -u git -H git clone --depth=1 https://gitlab.com/gitlab-org/gitlab-ce.git -b 7-2-stable gitlab
5-
cd /home/git/gitlab
6-
sudo -u git -H sh -c "cat config/gitlab.yml.example | sed 's/port: 80/port: 8080/g' > config/gitlab.yml"
7-
sudo chown -R git log/
8-
sudo chown -R git tmp/
9-
sudo chmod -R u+rwX log/
10-
sudo chmod -R u+rwX tmp/
11-
sudo -u git -H mkdir /home/git/gitlab-satellites
12-
sudo chmod u+rwx,g=rx,o-rwx /home/git/gitlab-satellites
13-
sudo chmod -R u+rwX tmp/pids/
14-
sudo chmod -R u+rwX tmp/sockets/
15-
sudo chmod -R u+rwX public/uploads
16-
sudo -u git -H cp config/unicorn.rb.example config/unicorn.rb
17-
sudo -u git -H cp config/initializers/rack_attack.rb.example config/initializers/rack_attack.rb
18-
sudo -u git -H git config --global user.name "GitLab"
19-
sudo -u git -H git config --global user.email "example@example.com"
20-
sudo -u git -H git config --global core.autocrlf input
21-
sudo -u git -H sh -c "cat config/database.yml.mysql | sed 's/password: \".*\"/password: "git"/g' > config/database.yml"
22-
sudo -u git -H chmod o-rwx config/database.yml
23-
bundle -v
24-
sudo -u git -H bundle install --deployment --without development test postgres aws
25-
sudo -u git -H bundle install --deployment --without development test postgres aws
3+
git clone --depth=1 https://gitlab.com/gitlab-org/gitlab-ce.git -b 7-2-stable gitlab
4+
cd /home/travis/gitlab
5+
sh -c "cat config/gitlab.yml.example | sed 's/port: 80/port: 8080/g' > config/gitlab.yml"
6+
chmod -R u+rwX log/
7+
chmod -R u+rwX tmp/
8+
mkdir /home/travis/gitlab-satellites
9+
chmod u+rwx,g=rx,o-rwx /home/travis/gitlab-satellites
10+
chmod -R u+rwX tmp/pids/
11+
chmod -R u+rwX tmp/sockets/
12+
chmod -R u+rwX public/uploads
13+
cp config/unicorn.rb.example config/unicorn.rb
14+
cp config/initializers/rack_attack.rb.example config/initializers/rack_attack.rb
15+
git config --global user.name "GitLab"
16+
git config --global user.email "example@example.com"
17+
git config --global core.autocrlf input
18+
sh -c "cat config/database.yml.mysql | sed 's/password: \".*\"/password: "git"/g' > config/database.yml"
19+
chmod o-rwx config/database.yml
20+
bundle install --deployment --without development test postgres aws
21+
bundle install --deployment --without development test postgres aws
2622
# install gitlab shell
27-
sudo -u git -H bundle exec rake gitlab:shell:install[v1.9.7] REDIS_URL=redis://localhost:6379 RAILS_ENV=production
28-
echo "yes" | sudo -u git -H bundle exec rake gitlab:setup RAILS_ENV=production
29-
sudo cp lib/support/init.d/gitlab /etc/init.d/gitlab
30-
sudo update-rc.d gitlab defaults 21
31-
sudo -u git -H bundle exec rake gitlab:env:info RAILS_ENV=production
32-
sudo -u git -H bundle exec rake assets:precompile RAILS_ENV=production
33-
sudo service gitlab restart
34-
sudo -u git -H bundle exec rake gitlab:check RAILS_ENV=production
23+
bundle exec rake gitlab:shell:install[v1.9.7] REDIS_URL=redis://localhost:6379 RAILS_ENV=production
24+
echo "yes" |bundle exec rake gitlab:setup RAILS_ENV=production
25+
cp lib/support/init.d/gitlab /etc/init.d/gitlab
26+
update-rc.d gitlab defaults 21
27+
bundle exec rake gitlab:env:info RAILS_ENV=production
28+
bundle exec rake assets:precompile RAILS_ENV=production
29+
service gitlab restart
30+
bundle exec rake gitlab:check RAILS_ENV=production
3531

scripts/prepare_test_env.sh

Lines changed: 2 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,12 @@
11
#!/bin/sh
22
# install dependencies
33
sudo apt-get update -qq
4-
# sudo apt-get install -y build-essential zlib1g-dev libyaml-dev libssl-dev libgdbm-dev libreadline-dev libncurses5-dev libffi-dev curl openssh-server redis-server checkinstall libxml2-dev libxslt-dev libcurl4-openssl-dev libicu-dev logrotate python-docutils pkg-config cmake
5-
#sudo apt-get install -y build-essential zlib1g-dev libyaml-dev libssl-dev libgdbm-dev libreadline-dev libncurses5-dev libffi-dev curl openssh-server checkinstall libxml2-dev libxslt-dev libcurl4-openssl-dev libicu-dev logrotate python-docutils pkg-config cmake
64
sudo apt-get install -y git-core
7-
#git --version
85
# install ruby
9-
#sudo apt-get remove -y ruby1.8 libruby1.8 libruby1.9.1
10-
#mkdir /tmp/ruby && cd /tmp/ruby
11-
#curl -L --progress ftp://ftp.ruby-lang.org/pub/ruby/2.1/ruby-2.1.2.tar.gz | tar xz
12-
#cd ruby-2.1.2
13-
#./configure --disable-install-rdoc
14-
#make
15-
#sudo make install
6+
curl -sSL https://get.rvm.io | bash -s stable --ruby
7+
gem install bundler
168
# install git user
179
sudo adduser --disabled-login --gecos 'GitLab' git
18-
sudo curl -sSL https://get.rvm.io | sudo bash -s stable --ruby
19-
which gem
20-
sudo rvm explode
2110
# install mysql
2211
sudo DEBIAN_FRONTEND=noninteractive apt-get install -y mysql-server mysql-client libmysqlclient-dev
2312
mysql --version

0 commit comments

Comments
 (0)