I was reading my daily news when I stumbled upon this article the other day. http://www.webappers.com/2011/10/26/github-like-repositories-hosting-on-your-server/ And I wanted to try it out. The only problem is that it's a ruby app, and I have previously no experience setting up any type of rails app...ever. And following their instructions didn't get me very far. I was wondering if someone with experience with webfaction and ruby on rails could give me some pointers. I know that webfaction has an easy one click git server install, but wanted to see if this gave me any extra functionality. The link to the repo of gitlabhq is: https://github.com/gitlabhq/gitlabhq Thank you in advance for all of your help, Chris asked 27 Oct '11, 11:20 Convoluted |
NOTE: This procedure is out-dated and broken.
3, Install Ruby 1.9.2 + Gitlab: # Execute these as your main user: easy_install pygments bash < <(curl -s https://raw.github.com/wayneeseguin/rvm/master/binscripts/rvm-installer) echo "export PATH=$HOME/.rvm/bin:$PATH">>.bash_profile . ~/.bash_profile rvm install 1.9.2 which ruby-1.9.2-p290 #should give ~/.rvm/bin/ruby-1.9.2-p290 gem-ruby-1.9.2-p290 update --system mkdir ~/src cd ~/src wget http://www.sqlite.org/sqlite-autoconf-3070800.tar.gz #sqlite3 needed for gem install tar -xvzf sqlite-autoconf-3070800.tar.gz cd sqlite-autoconf-3070800 ./configure --prefix=$HOME make make install cd export LD_LIBRARY_PATH=$HOME/lib export C_INCLUDE_PATH=$HOME/include gem-ruby-1.9.2-p290 install bundler git clone git://github.com/gitlabhq/gitlabhq.git cd gitlabhq/ #You may get a notice from RVM about trusting this directory's .rvmrc select y bundle bundle exec rake db:setup RAILS_ENV=production # create admin user # login....admin@local.host # pass.....5iveL!fe bundle exec rake db:seed_fu RAILS_ENV=production vi config/gitosis.yml #you will need to edit your gitosis settings, since I used the "git" username i didn't need to make any change # Now setup a custom app listening on port from the control panel and mount it on the domain you want to use for gitlab in a site record in the panel rails s -e production -p <port-for-that-custom-app> -d #go to your domain and login with the above username/password. That's it! answered 28 Oct '11, 02:11 neeravk Wow thank you for the info. I will try this when I get to work. When I create the admin user does it have to end @local.host or can I make it a normal email address? Does the port I make it listen to matter? Thank you once again, and I'll know how it goes.
(28 Oct '11, 05:49)
Convoluted
According to the the Installation page of GitlabHQ, those values are the default ones, so you shouldn't need to add a working email address. You should be able to change them if you edit the proper rake file, although it should probably give you an option later, via the web interface, to do so. The port does matter and it should be the one reserved for your app from the control panel, as that's the port that our frontend webserver will forward request for your website to.
(28 Oct '11, 06:11)
iliasr ♦♦
What would be the process to get this app into the one click installs of web faction?
(31 Oct '11, 13:27)
Convoluted
There's no formal process - it's based on user demand. If enough users ask for an installer for a particular application, we'll consider adding it. If you want to make your own 1-click installer, you could use our API to build it. Our API is documented here, and we have plenty of examples of installer scripts here.
(31 Oct '11, 14:10)
seanf
Hmm...getting an error after trying to make sqllite: make: *** No targets specified and no makefile found. Stop.
(01 Nov '11, 16:32)
Convoluted
Did you
(01 Nov '11, 17:20)
seanf
Hello guys, I've installed gitlab in my account but I can't run it due to it's memory usage. @neeravk do you have it installed? My installation uses 100~200mb. Is that correct? Btw I it on my own. Do you think I should try your steps?
(01 Nov '11, 20:53)
ptejada
It doesn't look like the installation procedure above would help to reduce memory usage. Anything based on rails in general tends to take a significant amount of memory; redmine, for example, is the same way. You may be able to apply some of these methods for redmine here, but we're not sure. That said, WebFaction accounts can support up to 240 MB of RAM, so you can always add more RAM if you need it. You can also purchase a second account + extra RAM to run gitlabhq independently.
(01 Nov '11, 21:11)
ryans ♦♦
Thanks @ryans is my first rail application i was just playing with it. I'll concider buying more RAM if I ever want to use gitlab
(01 Nov '11, 22:17)
ptejada
Found this quite useful, however there are some things missing: Before running make for sqlite run: ./configure --prefix=$HOME otherwise you've got nothing to make against. You'll also need to do the following (I did it before, but I don't know that it matters): cp config/gitlab.yml.example config/gitlab.yml cp config/database.yml.sqlite config/database.yml Then before running bundle in the gitlabhq directory you need to set your environment to use the rvm you just installed otherwise it won't pick up the bundle gem you installed. Run: rvm 1.9.2-p209 And substitute your "p" version - latest is 308 I believe and I believe you can use 1.9.3 as well. And then the bundle will perform correctly. However, you'll want to use this instead: gem install charlock_holmes bundle install --without development test However, if you don't have a dedicated IP, none of this really matters - as I just found out - since redis is required and needs to be listening on a custom port. But for those that do have a dedicated ip you'll need to edit the following file: vim ~/.rvm/gems/ruby-1.9.3-p125/gems/redis-2.2.2/lib/redis.rb Go to line 33 and change the port to whatever port you've setup for a custom app and your ip address where it says 127.0.0.1:6379. After this point I can no longer offer any advice since I don't have a dedicated IP, but everything should be kosher after this point. I'm sure some of this would be normal for most ruby developers, however, I do my day-to-day in Python so some of this was a pain (especially figuring out the rvm thing).
(10 Mar '12, 01:48)
ArrantSquid
Thanks, I corrected that.
The directory already contains .rvmrc so if you have rvm already loaded to your environment, you don't need to run it again.
Redis requires a custom port so you can run it on localhost by reserving a port by making a custom app listening on port. You don't need a dedicated IP for that, it was only needed before if you had to expose that port externally, you don't require a dedicated IP even for that purpose now.
(10 Mar '12, 03:05)
neeravk
Thanks for that info. I know that I kept getting issues once I got to the portion of the install where you initialized the database info: bundle exec rake db:setup RAILS_ENV=production Getting cannot connect to redis on 127.0.0.1:6779 (some port). When I tried changing it to a custom port that I had setup via an app it didn't seem to matter either. I never noticed an .rvm file in the directory, but I know that a lot has apparently changed and it doesn't use gitosis (such as it using gitolite). Would you be able to update the instructions to account for that or should I start a new question? I don't want to have multiple places for people to find info for webfaction, but I also don't want to hijack a thread.
(10 Mar '12, 17:56)
ArrantSquid
could we have this process into the one click installs of web faction?
(04 Jul '12, 14:04)
Chehab Mustafa
You could write your own install script, but we have no plans to add any more supported applications at this time.
(04 Jul '12, 17:10)
johns
i ran into a problem when i "rvm install 1.9.2" i think the problem is i cant install this on my machine , because i checked the error log and saw this "**** is not in the sudoers file." Any Help Please Thanks
(12 Oct '13, 05:25)
Naem Haddad
Use "rvm autolibs disable" before you run "rvm install 1.9.2" to disable dependencies that require root access.
(12 Oct '13, 07:58)
timg ♦♦
showing 5 of 16
show 11 more comments
|
Such a very helpful post. This is so much very helpful to my programming report. Surely more developments will be coming soon... answered 28 Nov '11, 05:35 Marelisa12 |
I documented the steps I took to get gitlab working... answered 09 Nov '14, 02:26 mogga |