# Deployment options using Github Enterprise + Rancher

**URL:** <https://forums.suse.com/t/deployment-options-using-github-enterprise-rancher/541>\
**Category:** Rancher 1.x\
**Created:** [September 23, 2015, 8:06pm UTC](https://forums.suse.com/t/deployment-options-using-github-enterprise-rancher/541 "2015-09-23T20:06:29Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Stokkes](https://avatars.discourse-cdn.com/v4/letter/s/848f3c/32.png) [@Stokkes](https://forums.suse.com/u/Stokkes)\
**Post date:** [September 23, 2015, 8:06pm UTC](https://forums.suse.com/t/deployment-options-using-github-enterprise-rancher/541/1 "2015-09-23T20:06:29Z")

</div>

Hello,

We have a private installation of GitHub Enterprise and in our current environment we’re not able to use S3 due to security reasons.

We’re trying to wrap our heads around using rancher-compose to deploy repositories from our GitHub Enterprise. I’m aware that you can use the `build: <git url>` paradigm to build the image on the fly, but I’m not sure how best to approach this assuming I would have to add an ssh key from the user who is building / pulling the image so they can authenticate on our environment.

Basically, I am trying to find a quick way to deploy to our Rancher environment using rancher-compose without using A) the Public Docker Hub registry and B) Without using S3.

We’ve contemplated running the free version of the docker registry but without any real web UI to work with, it’s still not at a point where we feel comfortable using this in a production environment (also, all our code is in Github enterprise, so we could easily convert some of those to docker containers by including a few files).

Any suggestions that we could use today?

Thanks,

---

<div class="post-metadata">

**Author:** ![denise](https://avatars.discourse-cdn.com/v4/letter/d/82dd89/32.png) [@denise](https://forums.suse.com/u/denise)\
**Post date:** [September 24, 2015, 6:42pm UTC](https://forums.suse.com/t/deployment-options-using-github-enterprise-rancher/541/2 "2015-09-24T18:42:50Z")

</div>

You could take any DockerFile any place it into a URL and create a build using the URL.

For example:

I have a very simple Dockerfile:

```auto
FROM nginx

CMD ["nginx", "-g", "daemon off;"]

```

And I placed it into a gist to make it into a URL. [https://gist.githubusercontent.com/deniseschannon/3276610b006382da655b/raw/11690eefe15de38e82d40d559f0db641722afb6c/buildtest](https://gist.githubusercontent.com/deniseschannon/3276610b006382da655b/raw/11690eefe15de38e82d40d559f0db641722afb6c/buildtest)

And I was able to run `rancher-compose` with this `docker-compose.yml` file.

```auto
nginxapp:
  restart: always
  tty: true
  stdin_open: true
  build: https://gist.githubusercontent.com/deniseschannon/3276610b006382da655b/raw/11690eefe15de38e82d40d559f0db641722afb6c/buildtest

```

Based on what you’re saying, I think this should work for you? As for authenticating against the environment (assuming you mean the Rancher environment, upper right hand corner in the UI), when you run `rancher-compose`, you pass in the URL and the API Key for the environment, so it would authenticate and be able to launch the service.

---

<div class="post-metadata">

**Author:** ![Stokkes](https://avatars.discourse-cdn.com/v4/letter/s/848f3c/32.png) [@Stokkes](https://forums.suse.com/u/Stokkes)\
**Post date:** [September 24, 2015, 7:36pm UTC](https://forums.suse.com/t/deployment-options-using-github-enterprise-rancher/541/3 "2015-09-24T19:36:49Z")

</div>

Hi Denise,

Thanks for the response… I’m not sure how well this would work. A few reasons I can think of:

1. The example uses a public Github URL, most of our docker configurations not only include a Dockerfile, but also requires support files to setup the image once it’s built (install script, other material, etc.). I guess these could be hosted “elsewhere” and pulled from within the Dockerfile, just seems messy

2. We can’t use [Github.com](http://Github.com) because it’s public. GitHub Enterprise requires authentication for any connection (either basic authentication if you use a URL with https:// or public key if using the ssh clone method).

When I talked about authentication, I meant against our GitHub Enterprise instance (sorry, I should have been clearer). All requests to the github enterprise must be authenticated with a user/pass or ssh key.

---

<div class="post-metadata">

**Author:** ![denise](https://avatars.discourse-cdn.com/v4/letter/d/82dd89/32.png) [@denise](https://forums.suse.com/u/denise)\
**Post date:** [September 24, 2015, 9:57pm UTC](https://forums.suse.com/t/deployment-options-using-github-enterprise-rancher/541/4 "2015-09-24T21:57:13Z")

</div>

The only workaround that I could see is to create a private registry and host images in the private registry and pull images from there.

Would that be a solution for you?

We could also add an enhancement request to add in the ability to rancher-compose to authenticate with GHE. Not sure if it’s even possible, but we could always ask. 🙂

---

<div class="post-metadata">

**Author:** ![Stokkes](https://avatars.discourse-cdn.com/v4/letter/s/848f3c/32.png) [@Stokkes](https://forums.suse.com/u/Stokkes)\
**Post date:** [September 25, 2015, 1:01pm UTC](https://forums.suse.com/t/deployment-options-using-github-enterprise-rancher/541/5 "2015-09-25T13:01:34Z")

</div>

Hi Denise,

I was actually thinking of the GHE integration with Rancher. Rancher already authenticates against GHE, so some of the foundation could already be there.

The ability to configure an SSH key or other method that would allow pulls from a GHE repository would be fantastic and in line with integration into a more corporate environment where things are self-hosted, but also secured.

In the interim, I guess our only choice is to setup a custom registry. Not ideal as the Private Registry from Docker doesn’t have much (if any if I remember correctly) Web UI (the Trusted Registry is an option, but not at this time for our org). Unless of course you have suggestions for alternative open source registry solutions!

Cheers,

---

<div class="post-metadata">

**Author:** ![denise](https://avatars.discourse-cdn.com/v4/letter/d/82dd89/32.png) [@denise](https://forums.suse.com/u/denise)\
**Post date:** [September 25, 2015, 4:14pm UTC](https://forums.suse.com/t/deployment-options-using-github-enterprise-rancher/541/6 "2015-09-25T16:14:55Z")

</div>

I just made an issue in GitHub for you to track your request. Another possibility could be [quay.io](http://quay.io)? I know that’s a popular one, but haven’t looked too much into it myself.

[https://github.com/rancher/rancher/issues/2144](https://github.com/rancher/rancher/issues/2144)
