Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improvement - gitlab-deploy image #46

Closed
arnos opened this issue Apr 22, 2014 · 17 comments
Closed

Improvement - gitlab-deploy image #46

arnos opened this issue Apr 22, 2014 · 17 comments

Comments

@arnos
Copy link

arnos commented Apr 22, 2014

Just an idea from shipyard project as you're removing the mysql + redis images from the core build.

They have a deploy image (that deploys redis, postgresql, nginx, hipache and their web-UI images) for quick setup
https://github.com/shipyard/shipyard-deploy

And they keep a separate set of instructions for a production deployement.

@sameersbn
Copy link
Owner

@arnos I came across this repo https://github.com/keeb/docker-ttl, its got a very interesting way of connecting to the docker server from the container. I was thinking maybe for the quick start guide we can mount the docker binary and start the database and redis servers on the host.

In short, the container would be started like this

docker run -i -t \
-v /usr/bin/docker:/bin/docker \
-v /var/run/docker.sock:/run/docker.sock \
sameersbn/gitlab:latest

The gitlab container will now have access to docker running on the host, which means it will be able to pull containers for the mysql/postgresql and redis servers and eventually get the whole thing to work.

Production environments will have to go through the setup procedure to configure the database and redis servers manually.

@arnos
Copy link
Author

arnos commented Apr 26, 2014

Yes the remote API, though I would see a setup image to secures the API
http://blog.james-carr.org/2013/10/30/securing-dockers-remote-api/ and load
redis, db and gitlab as separate containers.

On Saturday, April 26, 2014, Sameer Naik notifications@github.com wrote:

@arnos https://github.com/arnos I came across this repo
https://github.com/keeb/docker-ttl, its got a very interesting way of
connecting to the docker server from the container. I was thinking maybe
for the quick start guide we can mount the docker binary and start the
database and redis servers on the host.

In short, the container would be started like this

docker run -i -t
-v /usr/bin/docker:/bin/docker
-v /var/run/docker.sock:/run/docker.sock
sameersbn/gitlab:latest

The gitlab container will now have access to docker running on the host,
which means it will be able to pull containers for the mysql/postgresql and
redis servers and eventually get the whole thing to work.

Production environments will have to go through the setup procedure to
configure the database and redis servers manually.


Reply to this email directly or view it on GitHubhttps://github.com//issues/46#issuecomment-41460553
.

@arnos
Copy link
Author

arnos commented Apr 26, 2014

@sameersbn actually you've struck gold. Instead of doing as mentioned below
how about create a generic installer script (a la MSI for windows).

Anyone could use that installer image (based on buusybox perhaps) and
supply it with an installer.sh script that would walk the user to setting
up their image either with a cli or webased wizard.

Then each project would just point to a generic shell script on GitHub that
launches your installer image with the docker remote API and their
install.sh script...

Going further you could have a installation wizard builder, and even a cnet
of sorts to download pre-built curated installable images.

I'm kind of drooling at the possibity of integrating this.

On Saturday, April 26, 2014, Arno Schulz arnoschulz@gmail.com wrote:

Yes the remote API, though I would see a setup image to secures the API
http://blog.james-carr.org/2013/10/30/securing-dockers-remote-api/ and
load redis, db and gitlab as separate containers.

On Saturday, April 26, 2014, Sameer Naik <notifications@github.comjavascript:_e(%7B%7D,'cvml','notifications@github.com');>
wrote:

@arnos https://github.com/arnos I came across this repo
https://github.com/keeb/docker-ttl, its got a very interesting way of
connecting to the docker server from the container. I was thinking maybe
for the quick start guide we can mount the docker binary and start the
database and redis servers on the host.

In short, the container would be started like this

docker run -i -t
-v /usr/bin/docker:/bin/docker
-v /var/run/docker.sock:/run/docker.sock
sameersbn/gitlab:latest

The gitlab container will now have access to docker running on the host,
which means it will be able to pull containers for the mysql/postgresql and
redis servers and eventually get the whole thing to work.

Production environments will have to go through the setup procedure to
configure the database and redis servers manually.


Reply to this email directly or view it on GitHubhttps://github.com//issues/46#issuecomment-41460553
.

@sameersbn
Copy link
Owner

@arnos From what I understand, you mean we can create some sort of a docker image that helps in deploying complex application stacks like gitlab or shipyard where you need additional containers/services to complete the stack.

Such applications will probably have to define some sort of configuration for the deployment to happen. Like indicating what services are required, how each service has to be configured, the preferred docker image for each service, etc.

Problem is say an application requires a redis server and already a redis server is available, then we would somehow have to detect the same or ask the user. It could get complicated really quickly.

Maybe at first we can implement this in the gitlab container as part of the quick start guide and then try and see if this can be generalized and forked into a new image.

Also maybe, it would be replicating what chef already does. I am not sure.

@sameersbn
Copy link
Owner

@arnos whatever be the case lets keep this on the down low for the moment and get the SSL thing finished up.

@arnos arnos mentioned this issue May 13, 2014
@tritao
Copy link

tritao commented May 14, 2014

This is a great idea, having a Vagrant file to get it up and running quickly would also be very nice.

@sameersbn
Copy link
Owner

@arnos today I came across geard, which is very close to what you propose here. checkout https://www.youtube.com/watch?v=ZcEEnCMAMvo?t=24m for an overview. Pretty sweet stuff. Unfortunately it is currently only available for Fedora and RHEL. I think that it because of its dependency on systemd.

@arnos
Copy link
Author

arnos commented Jun 18, 2014

Yes I ran into it a month ago as well, it's part of red hat
http://www.projectatomic.io/, I heard was actually RedHat's version of
docker until docker came along.

On Wednesday, June 18, 2014, Sameer Naik notifications@github.com wrote:

@arnos https://github.com/arnos today I came across geard
http://openshift.github.io/geard/, which is very close to what you
propose here. checkout Dockercon Keynote: Brian Stevens (Red Hat)
https://www.youtube.com/watch?v=ZcEEnCMAMvo?t=24m for an overview.
Pretty sweet stuff. Unfortunately it is currently only available for Fedora
and RHEL. I think that it because of its dependency on systemd.


Reply to this email directly or view it on GitHub
#46 (comment)
.

@piclez
Copy link

piclez commented Jun 20, 2014

I liked the idea of having a Vagrantfile too +1

@sameersbn
Copy link
Owner

@piclez I have never used vagrant, just installed it yesterday to do some selinux testing. Since I use linux as my primary OS and since docker has come along VM's are a no go for me. That said, since I now have vagrant installed, I will try to create a vagrant file for this image.

@sameersbn
Copy link
Owner

@piclez @tritao FWIW the official gitlab cookbook includes a vagrant file. You might want to check if thats what you need.

@djdefi
Copy link

djdefi commented Aug 5, 2014

Could also utilize fig ( https://github.com/orchardup/fig ) as an alternative to Vagrant.

Something like:

fig.yml:

gitlab:
  image:  sameersbn/gitlab:latest
  links:
   - redis:redisio
  ports:
   - "80:80"
   - "10022:22"
redis:
  image: sameersbn/redis:latest

Would also be able to add a database container and persistent volumes etc to this.

@sameersbn
Copy link
Owner

@djdefi I was thinking about the same

@kfatehi
Copy link

kfatehi commented Aug 17, 2014

my program ydm is now functionally complete for use as an installer of @sameersbn's gitlab image. you can check the source here https://github.com/keyvanfatehi/ydm or grab it from npm https://www.npmjs.org/package/ydm

after installing, try installing gitlab with ydm gitlab install --namespace test -- from there the error message will help you pass in customized environment variables.

@sameersbn
Copy link
Owner

@keyvanfatehi will try it as soon I get the time. Once I can confirm I will close this issue.

@dkapanidis
Copy link
Contributor

I added the fig.yml as PR. It was necessary to make a small change in order to auto-configure database on first-launch, wthen the PR is merged the fig.yml file will be ready to work even remotely (no need to compile anything)

As for the installer part, I open-sourced part of what I'm doing at http://harbur.io/
you can check the https://github.com/harbur/docker-sdlc repo. It is a collection of fig.yml files that support multi-container orchestration of an SDLC environment.

The purpose of that repo is to be production-ready setup guide. Fig format to describe multi-container setup is pretty robust and using https://github.com/centurylinklabs/fig2coreos iit can be easily translated to coreOS configuration to adapt to more corporate environments.

hope you find it useful.

@sameersbn
Copy link
Owner

docker-gitlab can now be deployed using fig as implemented in #158 by @Spiddy . Alternately you could also use also use the https://github.com/keyvanfatehi/ydm tool being developed by @keyvanfatehi .

Marking issue as closed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants