rancher / vagrant

Vagrant file to stand up a Local Rancher install with 3 nodes
81 stars 56 forks source link

2.0 not working? #45

Open Sarke opened 6 years ago

Sarke commented 6 years ago

The 2.0 branch doesn't appear to work. After vagrant up I get this in a loop:

    server-01: + wget -T 5 -c https://localhost/ping
    server-01: Connecting to localhost (127.0.0.1:443)
    server-01: wget: error getting response: Connection reset by peer
    server-01: + sleep 5
    server-01: + true
    server-01: + wget -T 5 -c https://localhost/ping
    server-01: Connecting to localhost (127.0.0.1:443)
    server-01: wget: error getting response: Connection reset by peer
    server-01: + sleep 5
    server-01: + true
    server-01: + wget -T 5 -c https://localhost/ping
    server-01: Connecting to localhost (127.0.0.1:443)
    server-01: wget: error getting response: Connection reset by peer
    server-01: + sleep 5
    server-01: + true
    server-01: + wget -T 5 -c https://localhost/ping
    server-01: Connecting to localhost (127.0.0.1:443)
    server-01: wget: error getting response: Connection reset by peer
    server-01: + sleep 5
    server-01: + true
chrisurwin commented 6 years ago

How long did you wait? It does do this until the rancher container has started and depending on the speed of the machine this could be a minute or 2...

jasonrgd commented 6 years ago

I think this is because the wrong tag is used.. I confirm this is an issue ..

jasonrgd commented 6 years ago

Is the 2.0 branch meant to be running the rancher server 2.0 version @chrisurwin? I can fix and submit a patch.

Sarke commented 6 years ago

@chrisurwin, I waited a long time.

@jasonrgd, I'm not sure but I assumed it was since it's a newer branch and called "2.0".

jasonrgd commented 6 years ago

@Sarke the registry image still points to 1.0

jasonrgd commented 6 years ago

@Sarke if you want to try out rancher 2.0 you should use my vagrant repo. I can start rancher2.0 without any issues .

jasonrgd commented 6 years ago

https://github.com/jasonrgd/FAB

chrisurwin commented 6 years ago

@Sarke Can you try using the vagrant image from https://github.com/rancher/quickstart?

It is based off this repo but simplified to just running Rancher 2.0 without all of the complex airgap/registries config

stefanlasiewski commented 5 years ago

Hey @chrisurwin, this isn't working. I was hoping to use this Vagrant image to help model some different architectures. The Quickstart image is too simple for what I need to do.

I'm pretty sure that this image uses an outdated name or URL when trying to pull down Rancher Server 2.0.

Here are some steps to reproduce on my Mac:

  1. Check out the repo & switch to the 2.0 branch:
$ git clone https://github.com/rancher/vagrant.git rancher
Cloning into 'rancher'...
remote: Enumerating objects: 356, done.
remote: Total 356 (delta 0), reused 0 (delta 0), pack-reused 356
Receiving objects: 100% (356/356), 228.33 KiB | 2.78 MiB/s, done.
Resolving deltas: 100% (200/200), done.
$ cd rancher
$ git branch -a
* master
  remotes/origin/2.0
  remotes/origin/HEAD -> origin/master
  remotes/origin/master
  remotes/origin/rke
  remotes/origin/windows
$ git checkout 2.0
Branch 2.0 set up to track remote branch 2.0 from origin.
Switched to a new branch '2.0'
  1. Start the server:
$ vagrant up
Config: {"default_password"=>"password1", "network_mode"=>"normal", "sslenabled"=>"false", "ssldns"=>"server.rancher.vagrant", "version"=>"master", "rancher_env_vars"=>"", "agent_version"=>"v1.2.5", "ROS_version"=>"1.0.3", "master"=>{"cpus"=>1, "memory"=>1024}, "server"=>{"count"=>1, "cpus"=>1, "memory"=>2048}, "node"=>{"count"=>2, "cpus"=>1, "memory"=>2048}, "ip"=>{"master"=>"172.22.101.100", "server"=>"172.22.101.101", "node"=>"172.22.101.111"}, "linked_clones"=>true, "net"=>{"private_nic_type"=>"82545EM", "network_type"=>"private_network"}, "keys"=>{"public_key"=>"", "private_key"=>""}, "external_access"=>{"enabled"=>false, "ssh_port"=>2277, "http_port"=>80, "https_port"=>443}}

Bringing machine 'master' up with 'virtualbox' provider...
Bringing machine 'server-01' up with 'virtualbox' provider...
Bringing machine 'node-01' up with 'virtualbox' provider...
Bringing machine 'node-02' up with 'virtualbox' provider...
==> master: Importing base box 'williamyeh/ubuntu-trusty64-docker'...
...
  1. Vagrant will build the master node and will attempt to build the server-01 nodes. Eventually, the VM will fail to actually pull down the Rancher Server 2.0 image
    server-01: + rancher_command=rancher/server:master
    server-01: + echo Installing Rancher Server
    server-01: + sudo docker run -d --restart=always -p 443:443 -p 80:80 --restart=unless-stopped --name rancher-server rancher/server:master
    server-01: Unable to find image 'rancher/server:master' locally
    server-01: Pulling repository docker.io/rancher/server
    server-01: docker: Tag master not found in repository docker.io/rancher/server.
    server-01: See 'docker run --help'.
  1. And then the VM will start looping. The loop will go forever (I left this running for an hour):

    server-01: + true
    server-01: + wget -T 5 -c https://localhost/ping
    server-01: Connecting to localhost (127.0.0.1:443)
    server-01: wget: can't connect to remote host (127.0.0.1): Connection refused
  2. Open a second window, log in and confirm that I cannot pull an image:

$ vagrant ssh server-01
[rancher@server-01 ~]$ sudo docker pull rancher/server:master
Pulling repository docker.io/rancher/server
Tag master not found in repository docker.io/rancher/server
[rancher@server-01 ~]$
stefanlasiewski commented 5 years ago

I added a fix which should prevent this specific issue with the wget -T 5 -c https://localhost/ping looping.

I also added fixed the tag used by the Vagrant project. Rancher now starts, and I am able to deploy workloads to the cluster.

ThWoywod commented 5 years ago

Are there any news about this issue? I try to use rancher 2.0 with this vagrant setup and run in the same error.

ibawolf commented 5 years ago

Me too! I just got it working with the instructions from jasonrdg and his alternate repo. I need to go there and see if he has any instructions about how to access it,

jasonrgd commented 5 years ago

Hi Guys, if you need any help please let me know.. I'm happy to help @ibawolf @ThWoywod

nlitterat commented 5 years ago

I am also having this issue Is there any way around it?

chrisurwin commented 5 years ago

I've not had chance to look at this for a while but I'd suggest using https://github.com/rancher/quickstart and use the vagrant file in there. It's not got as many configuration options but it will get you up and running with 2.0 in vagrant quickly.