Commit f26ef4c7b4458397fb905ab49ac7c8db94564692
Exists in
master
and in
17 other branches
Merge branch 'centos_installation' into 'master'
Centos Installation
Showing
2 changed files
with
172 additions
and
154 deletions
Show diff stats
README.md
| ... | ... | @@ -5,6 +5,9 @@ GitLab! |
| 5 | 5 | |
| 6 | 6 | ## Installation |
| 7 | 7 | |
| 8 | +After the steps below your GitLab instance should reachable over HTTP, | |
| 9 | +and have an admin user with username `root` and password `5iveL!fe`. | |
| 10 | + | |
| 8 | 11 | ### Ubuntu |
| 9 | 12 | |
| 10 | 13 | ``` |
| ... | ... | @@ -14,6 +17,17 @@ sudo dpkg -i gitlab-x.y.z.deb # this is the .deb you downloaded |
| 14 | 17 | sudo gitlab-ctl reconfigure |
| 15 | 18 | ``` |
| 16 | 19 | |
| 20 | +### CentOS 6.5 | |
| 21 | + | |
| 22 | +``` | |
| 23 | +sudo yum install openssh-server | |
| 24 | +sudo yum install postfix # sendmail or exim is also OK | |
| 25 | +sudo rpm -i gitlab-x.y.z.rpm | |
| 26 | +sudo gitlab-ctl reconfigure | |
| 27 | +# Open up the firewall for HTTP and SSH | |
| 28 | +sudo lokkit -s http -s ssh | |
| 29 | +``` | |
| 30 | + | |
| 17 | 31 | ## How to manage an Omnibus-installed GitLab |
| 18 | 32 | |
| 19 | 33 | ### Administrative commands |
| ... | ... | @@ -45,163 +59,12 @@ Omnibus-gitlab uses four different directories. |
| 45 | 59 | |
| 46 | 60 | - `/opt/gitlab` holds application code for GitLab and its dependencies. |
| 47 | 61 | - `/var/opt/gitlab` holds application data and configuration files that |
| 48 | - `gitlab-ctl reconfigure` writes too. | |
| 62 | + `gitlab-ctl reconfigure` writes to. | |
| 49 | 63 | - `/etc/gitlab` holds configuration files for omnibus-gitlab. These are |
| 50 | 64 | the only files that you should ever have to edit manually. |
| 51 | 65 | - `/var/log/gitlab` contains all log data generated by components of |
| 52 | 66 | omnibus-gitlab. |
| 53 | 67 | |
| 54 | -## Preparing a build environment | |
| 55 | - | |
| 56 | -To create builds you will need a build user (`omnibus-build:omnibus-build` in our example). | |
| 57 | -Preparing the build machine requires sudo access. | |
| 58 | - | |
| 59 | -### Ubuntu 12.04 | |
| 60 | - | |
| 61 | -```shell | |
| 62 | -# Install dependencies | |
| 63 | -sudo apt-get install ruby1.9.1 ruby1.9.1-dev git build-essential | |
| 64 | -sudo gem install --no-ri --no-rdoc bundler | |
| 65 | - | |
| 66 | -# Create build directories for use by the build user | |
| 67 | -sudo mkdir -p /opt/gitlab /var/cache/omnibus | |
| 68 | -# We assume the build user and group is 'omnibus-build' | |
| 69 | -sudo chown omnibus-build:omnibus-build /opt/gitlab /var/cache/omnibus | |
| 70 | -``` | |
| 71 | - | |
| 72 | -Then, as the build user (omnibus-build): | |
| 73 | - | |
| 74 | -```shell | |
| 75 | -# Clone the omnibus repo | |
| 76 | -git clone https://gitlab.com/gitlab-org/omnibus-gitlab.git | |
| 77 | - | |
| 78 | -# Install gem dependencies for omnibus-ruby | |
| 79 | -cd omnibus-gitlab | |
| 80 | -bundle install --path .bundle --binstubs | |
| 81 | - | |
| 82 | -# Do a build (and take a break from the computer) | |
| 83 | -bin/omnibus build project gitlab | |
| 84 | -``` | |
| 85 | - | |
| 86 | -### Centos 6.5 | |
| 87 | - | |
| 88 | -```shell | |
| 89 | -sudo yum groupinstall 'Development Tools' | |
| 90 | -# Install RedHat Software Collections to get Ruby 1.9.3 | |
| 91 | -sudo yum install centos-release-SCL | |
| 92 | -sudo yum install ruby193 ruby193-ruby-devel | |
| 93 | - | |
| 94 | -# Create build directories for use by the build user | |
| 95 | -sudo mkdir -p /opt/gitlab /var/cache/omnibus | |
| 96 | -# We assume the build user and group is 'omnibus-build' | |
| 97 | -sudo chown omnibus-build:omnibus-build /opt/gitlab /var/cache/omnibus | |
| 98 | -``` | |
| 99 | - | |
| 100 | -As the build user (omnibus-build): | |
| 101 | - | |
| 102 | -```shell | |
| 103 | -# Enable Ruby 1.9.3 from Software Collections | |
| 104 | -echo 'exec scl enable ruby193 bash' >> .bash_profile | |
| 105 | -# Start a new login shell so we do not have to log out and in | |
| 106 | -# this one time | |
| 107 | -bash --login | |
| 108 | - | |
| 109 | -# Clone the omnibus repo | |
| 110 | -git clone https://gitlab.com/gitlab-org/omnibus-gitlab.git | |
| 111 | - | |
| 112 | -# Install gem dependencies for omnibus-ruby | |
| 113 | -cd omnibus-gitlab | |
| 114 | -bundle install --path .bundle --binstubs | |
| 115 | - | |
| 116 | -# Do a build (and take a break from the computer) | |
| 117 | -bin/omnibus build project gitlab | |
| 118 | -``` | |
| 119 | - | |
| 120 | -## Usage | |
| 121 | - | |
| 122 | -### Build | |
| 123 | - | |
| 124 | -You create a platform-specific package using the `build project` command: | |
| 125 | - | |
| 126 | -```shell | |
| 127 | -$ bin/omnibus build project gitlab | |
| 128 | -``` | |
| 129 | - | |
| 130 | -The platform/architecture type of the package created will match the platform | |
| 131 | -where the `build project` command is invoked. So running this command on say a | |
| 132 | -MacBook Pro will generate a Mac OS X specific package. After the build | |
| 133 | -completes packages will be available in `pkg/`. | |
| 134 | - | |
| 135 | -### Clean | |
| 136 | - | |
| 137 | -You can clean up all temporary files generated during the build process with | |
| 138 | -the `clean` command: | |
| 139 | - | |
| 140 | -```shell | |
| 141 | -$ bin/omnibus clean | |
| 142 | -``` | |
| 143 | - | |
| 144 | -Adding the `--purge` purge option removes __ALL__ files generated during the | |
| 145 | -build including the project install directory (`/opt/gitlab`) and | |
| 146 | -the package cache directory (`/var/cache/omnibus/pkg`): | |
| 147 | - | |
| 148 | -```shell | |
| 149 | -$ bin/omnibus clean --purge | |
| 150 | -``` | |
| 151 | - | |
| 152 | -### Help | |
| 153 | - | |
| 154 | -Full help for the Omnibus command line interface can be accessed with the | |
| 155 | -`help` command: | |
| 156 | - | |
| 157 | -```shell | |
| 158 | -$ bin/omnibus help | |
| 159 | -``` | |
| 160 | - | |
| 161 | -## Vagrant-based Virtualized Build Lab | |
| 162 | - | |
| 163 | -Every Omnibus project ships will a project-specific | |
| 164 | -[Berksfile](http://berkshelf.com/) and [Vagrantfile](http://www.vagrantup.com/) | |
| 165 | -that will allow you to build your projects on the following platforms: | |
| 166 | - | |
| 167 | -* CentOS 5 64-bit | |
| 168 | -* CentOS 6 64-bit | |
| 169 | -* Ubuntu 10.04 64-bit | |
| 170 | -* Ubuntu 11.04 64-bit | |
| 171 | -* Ubuntu 12.04 64-bit | |
| 172 | - | |
| 173 | -Please note this build-lab is only meant to get you up and running quickly; | |
| 174 | -there's nothing inherent in Omnibus that restricts you to just building CentOS | |
| 175 | -or Ubuntu packages. See the Vagrantfile to add new platforms to your build lab. | |
| 176 | - | |
| 177 | -The only requirements for standing up this virtualized build lab are: | |
| 178 | - | |
| 179 | -* VirtualBox - native packages exist for most platforms and can be downloaded | |
| 180 | -from the [VirtualBox downloads page](https://www.virtualbox.org/wiki/Downloads). | |
| 181 | -* Vagrant 1.2.1+ - native packages exist for most platforms and can be downloaded | |
| 182 | -from the [Vagrant downloads page](http://downloads.vagrantup.com/). | |
| 183 | - | |
| 184 | -The [vagrant-berkshelf](https://github.com/RiotGames/vagrant-berkshelf) and | |
| 185 | -[vagrant-omnibus](https://github.com/schisamo/vagrant-omnibus) Vagrant plugins | |
| 186 | -are also required and can be installed easily with the following commands: | |
| 187 | - | |
| 188 | -```shell | |
| 189 | -$ vagrant plugin install vagrant-berkshelf | |
| 190 | -$ vagrant plugin install vagrant-omnibus | |
| 191 | -``` | |
| 192 | - | |
| 193 | -Once the pre-requisites are installed you can build your package across all | |
| 194 | -platforms with the following command: | |
| 195 | - | |
| 196 | -```shell | |
| 197 | -$ vagrant up | |
| 198 | -``` | |
| 199 | - | |
| 200 | -If you would like to build a package for a single platform the command looks like this: | |
| 201 | - | |
| 202 | -```shell | |
| 203 | -$ vagrant up PLATFORM | |
| 204 | -``` | |
| 68 | +## Building your own package | |
| 205 | 69 | |
| 206 | -The complete list of valid platform names can be viewed with the | |
| 207 | -`vagrant status` command. | |
| 70 | +See (doc/build.md). | ... | ... |
| ... | ... | @@ -0,0 +1,155 @@ |
| 1 | +# Preparing a build environment | |
| 2 | + | |
| 3 | +To create builds you will need a build user (`omnibus-build:omnibus-build` in our example). | |
| 4 | +Preparing the build machine requires sudo access. | |
| 5 | + | |
| 6 | +## Ubuntu 12.04 | |
| 7 | + | |
| 8 | +```shell | |
| 9 | +# Install dependencies | |
| 10 | +sudo apt-get install ruby1.9.1 ruby1.9.1-dev git build-essential | |
| 11 | +sudo gem install --no-ri --no-rdoc bundler | |
| 12 | + | |
| 13 | +# Create build directories for use by the build user | |
| 14 | +sudo mkdir -p /opt/gitlab /var/cache/omnibus | |
| 15 | +# We assume the build user and group is 'omnibus-build' | |
| 16 | +sudo chown omnibus-build:omnibus-build /opt/gitlab /var/cache/omnibus | |
| 17 | +``` | |
| 18 | + | |
| 19 | +Then, as the build user (omnibus-build): | |
| 20 | + | |
| 21 | +```shell | |
| 22 | +# Clone the omnibus repo | |
| 23 | +git clone https://gitlab.com/gitlab-org/omnibus-gitlab.git | |
| 24 | + | |
| 25 | +# Install gem dependencies for omnibus-ruby | |
| 26 | +cd omnibus-gitlab | |
| 27 | +bundle install --path .bundle --binstubs | |
| 28 | + | |
| 29 | +# Do a build (and take a break from the computer) | |
| 30 | +bin/omnibus build project gitlab | |
| 31 | +``` | |
| 32 | + | |
| 33 | +## Centos 6.5 | |
| 34 | + | |
| 35 | +```shell | |
| 36 | +sudo yum groupinstall 'Development Tools' | |
| 37 | +# Install RedHat Software Collections to get Ruby 1.9.3 | |
| 38 | +sudo yum install centos-release-SCL | |
| 39 | +sudo yum install ruby193 ruby193-ruby-devel | |
| 40 | + | |
| 41 | +# Create build directories for use by the build user | |
| 42 | +sudo mkdir -p /opt/gitlab /var/cache/omnibus | |
| 43 | +# We assume the build user and group is 'omnibus-build' | |
| 44 | +sudo chown omnibus-build:omnibus-build /opt/gitlab /var/cache/omnibus | |
| 45 | +``` | |
| 46 | + | |
| 47 | +As the build user (omnibus-build): | |
| 48 | + | |
| 49 | +```shell | |
| 50 | +# Enable Ruby 1.9.3 from Software Collections | |
| 51 | +echo 'exec scl enable ruby193 bash' >> .bash_profile | |
| 52 | +# Start a new login shell so we do not have to log out and in | |
| 53 | +# this one time | |
| 54 | +bash --login | |
| 55 | + | |
| 56 | +# Clone the omnibus repo | |
| 57 | +git clone https://gitlab.com/gitlab-org/omnibus-gitlab.git | |
| 58 | + | |
| 59 | +# Install gem dependencies for omnibus-ruby | |
| 60 | +cd omnibus-gitlab | |
| 61 | +bundle install --path .bundle --binstubs | |
| 62 | + | |
| 63 | +# Do a build (and take a break from the computer) | |
| 64 | +bin/omnibus build project gitlab | |
| 65 | +``` | |
| 66 | + | |
| 67 | +## Usage | |
| 68 | + | |
| 69 | +### Build | |
| 70 | + | |
| 71 | +You create a platform-specific package using the `build project` command: | |
| 72 | + | |
| 73 | +```shell | |
| 74 | +$ bin/omnibus build project gitlab | |
| 75 | +``` | |
| 76 | + | |
| 77 | +The platform/architecture type of the package created will match the platform | |
| 78 | +where the `build project` command is invoked. So running this command on say a | |
| 79 | +MacBook Pro will generate a Mac OS X specific package. After the build | |
| 80 | +completes packages will be available in `pkg/`. | |
| 81 | + | |
| 82 | +### Clean | |
| 83 | + | |
| 84 | +You can clean up all temporary files generated during the build process with | |
| 85 | +the `clean` command: | |
| 86 | + | |
| 87 | +```shell | |
| 88 | +$ bin/omnibus clean | |
| 89 | +``` | |
| 90 | + | |
| 91 | +Adding the `--purge` purge option removes __ALL__ files generated during the | |
| 92 | +build including the project install directory (`/opt/gitlab`) and | |
| 93 | +the package cache directory (`/var/cache/omnibus/pkg`): | |
| 94 | + | |
| 95 | +```shell | |
| 96 | +$ bin/omnibus clean --purge | |
| 97 | +``` | |
| 98 | + | |
| 99 | +### Help | |
| 100 | + | |
| 101 | +Full help for the Omnibus command line interface can be accessed with the | |
| 102 | +`help` command: | |
| 103 | + | |
| 104 | +```shell | |
| 105 | +$ bin/omnibus help | |
| 106 | +``` | |
| 107 | + | |
| 108 | +## Vagrant-based Virtualized Build Lab | |
| 109 | + | |
| 110 | +Every Omnibus project ships will a project-specific | |
| 111 | +[Berksfile](http://berkshelf.com/) and [Vagrantfile](http://www.vagrantup.com/) | |
| 112 | +that will allow you to build your projects on the following platforms: | |
| 113 | + | |
| 114 | +* CentOS 5 64-bit | |
| 115 | +* CentOS 6 64-bit | |
| 116 | +* Ubuntu 10.04 64-bit | |
| 117 | +* Ubuntu 11.04 64-bit | |
| 118 | +* Ubuntu 12.04 64-bit | |
| 119 | + | |
| 120 | +Please note this build-lab is only meant to get you up and running quickly; | |
| 121 | +there's nothing inherent in Omnibus that restricts you to just building CentOS | |
| 122 | +or Ubuntu packages. See the Vagrantfile to add new platforms to your build lab. | |
| 123 | + | |
| 124 | +The only requirements for standing up this virtualized build lab are: | |
| 125 | + | |
| 126 | +* VirtualBox - native packages exist for most platforms and can be downloaded | |
| 127 | +from the [VirtualBox downloads page](https://www.virtualbox.org/wiki/Downloads). | |
| 128 | +* Vagrant 1.2.1+ - native packages exist for most platforms and can be downloaded | |
| 129 | +from the [Vagrant downloads page](http://downloads.vagrantup.com/). | |
| 130 | + | |
| 131 | +The [vagrant-berkshelf](https://github.com/RiotGames/vagrant-berkshelf) and | |
| 132 | +[vagrant-omnibus](https://github.com/schisamo/vagrant-omnibus) Vagrant plugins | |
| 133 | +are also required and can be installed easily with the following commands: | |
| 134 | + | |
| 135 | +```shell | |
| 136 | +$ vagrant plugin install vagrant-berkshelf | |
| 137 | +$ vagrant plugin install vagrant-omnibus | |
| 138 | +``` | |
| 139 | + | |
| 140 | +Once the pre-requisites are installed you can build your package across all | |
| 141 | +platforms with the following command: | |
| 142 | + | |
| 143 | +```shell | |
| 144 | +$ vagrant up | |
| 145 | +``` | |
| 146 | + | |
| 147 | +If you would like to build a package for a single platform the command looks like this: | |
| 148 | + | |
| 149 | +```shell | |
| 150 | +$ vagrant up PLATFORM | |
| 151 | +``` | |
| 152 | + | |
| 153 | +The complete list of valid platform names can be viewed with the | |
| 154 | +`vagrant status` command. | |
| 155 | + | ... | ... |