What ENV config variables are available for starting Rancher server? I cant find more the as described here: https://docs.rancher.com/rancher/v1.2/en/installing-rancher/installing-server/no-internet-access/
Would like to know how to install a given orchestration type cluster without internet access, not having to pre-pull and retag all images on hosts.
Topic’s Rancher Swarm Env. with no internet acces and Rancher Kubernetes in an offline infratstructure seem dead in the water.
I’ve been having mixed results with this recently, if youre using a private registry you might want to pull and retag the image to just rancher/server and ‘rancher/agent’ as well as ‘rancher/agent-instance’. See if that gets you going.
That gets me going though I feel it should be a set of Rancher config options as the CATTLE_AGENT_INSTANCE_IMAGE is.
From my understanding that should be set in the
/var/lib/rancher/etc/agent.conf with the content of
Rancher 1.2 offline install guide triggered me to look at the catalog entries more closely; Would you say the following could work (lets assume I want to add Mesos Rancher hosts):
- Create an on-premise local copy of the the community catalog
- Modify the infra-templates/mesos docker-compose.yml to point to my private registry images
- Add the custom catalog to my Rancher configuration
- Add host -> custom -> Run the command on a host machine.
Would Rancher then look at the infra template and get the images from my private registry?
Created an issue for offline install about prepulling images and retagging them, that’s what we use at the moment as well: https://github.com/rancher/rancher/issues/6816
Do we have a solution yet or any successful case?
@balzaczyy; I am going to try to upgrade our offline on-premise 1.1.4 Rancher server somewhere in the next few weeks, to make it work I will have to test my hypothesis. So I will let you know.
PS: @omega_m already tested some parts of it in this topic: Rancher Kubernetes in an offline infratstructure
I actually tried clone and host the private catalog and made it work. One suggestion, the git should be public accessible. Rancher should support token access to private hosted catalog.
@balzaczyy, I tried the method few days ago with no success. Could see in logs, rancher still trying to get to dockerhub for
rancher/net and other images. First was upgrade and that was no fun…then wiped everything with a fresh install only to see it not work as expected.
My steps (for cattle env):
Create a custom catalog (clone from rancher-catalog)
Push images to internal private registry
Create an environment (default could not be edited) template
Add host (same box where agent would run)
Run agent script on same host
Infra services would not start…times out.
Logs show rancher trying to grab images for infra services from dockerhub…that obviously did not work.
You see anything I missed?
@srikarm, did you run Rancher Server like this:
docker run -d --restart=unless-stopped \
---> -e DEFAULT_CATTLE_CATALOG_URL='library=http://local-git.local/rancher-catalog.git' \
-e CATTLE_BOOTSTRAP_REQUIRED_IMAGE=local.registry.local:5000/rancher/agent:v1.1.0 \
-e CATTLE_LB_INSTANCE_IMAGE=local.registry.local:5000/rancher/lb-service-haproxy:v0.4.2 \
-p 8080:8080 \
--name rancher-server local.registry.local:5000/rancher/server:v1.2.0
@stefanvangastel I don’t recall passing catalog ENV to run command. Will try this. Thanks
@stefanvangastel, I was able to do a fresh install with above config. Thanks