-
Notifications
You must be signed in to change notification settings - Fork 797
Local Development instructions using Vagrant #374
Conversation
Local Development instructions using Vagrant
I am trying to run these instructions on Ubuntu 12.04 host and getting SSL errors
I installed Berkshelf 3 and changed Gemfile
http://docs.deis.io/en/latest/contributing/localdev/ would be handy to have specific dependency version installation instructions included on a fresh Ubuntu 12 install are you folks doing local Vagrant dev on Mac hosts and Ubuntu guests? if so, there are important differences and it gets pretty ugly quickly just following mac oriented install instructions for Ruby on Ubuntu anyway, super promising open paas platform and I am sorry I am so friggin grumpy been doing the Ruby version tango all day cheers |
just rebooted to ensure versions knife client list |
Just to rule out the obvious; is the chef server definitely set up and pingable? So does |
thanks for bringing it back to the obvious, I added IP of chefserver.local to hosts file and could ping and run tests OK as above weirdly I could vagrant ssh into box without the /etc/hosts IP added but knife wouldn't work without it is this normal to have to add IP to hosts file on host when working with vagrant? is it a quirk of my set-up perhaps? |
Is avahi-daemon necessary on the Linux host as well? We use that to set up name resolution for "deis-controller.local". I confess we (@gabrtv and myself) do development on Mac OS X, but @tombh and some other contributors are on Linux I believe, and our target and continuous integration and tests are all about Ubuntu. This may not be related to that, but anything in a Deis provisioning script or elsewhere that doesn't work on Linux is a bug of course, and we'll attend to it right away. |
avahi-daemon --check returns nothing i.e. doesnt return 0, its not running.. am continuing with install instructions thanks again |
got related errors for deis-controller.local stdin: is not a tty Connection to 127.0.0.1 closed. strangely, avahi doesnt seem to be running although Vagrant thinks it is? will need to investigate that more will try the hosts file hack and do step again |
just noticed avahi-daemon install on Ubuntu is a later step, I guess that needs to change ? SSH |
ok, I am a bit confused, not sure if the avahi was installed during desi controller stage, but now its running pgrep avahi | xargs ps but, if I comment out the IP in etc/hosts and avahi doesnt seem to be doing its job knife client list alright, thats me for the night CHEERS |
Great, we're making progress then :) No, you shouldn't have to manually add IP addresses to /etc/hosts, that's exactly what avahi-daemon is for. BTW, yes I'm on Linux, Debian Sid to be exact. So, just to be clear about what avahi-daemon does; it broadcasts the hostname (as resolvable to its IP) of the machine upon which it runs. Therefore if you just want to access the chefserver.local, then avahi only needs to be running on the Chef Server VM, not your host machine. However, avahi is needed on your host machine later on for a completely separate function. That is so the Deis Controller can SSH outside itself and into your host machine in order to programatically run vagrant commands. So, from what I've just said and what you say @niccolox I think there is a mistake in the vagrant README. Steps 4 and 5 should be swapped around. The provision script does a dependency check for a running avahi-daemon process. Running the provision script is step 4. But then the instruction to install avahi-daemon comes from step 5. But, I don't see how this would solve your problem @niccolox :( If the Chef Server is set up correctly then it should have avahi installed and be broadcasting its IP. Perhaps there's a DNS caching issue now? Maybe the fact that /etc/hosts resolved the chefserver.local hostname first prevented avahi from doing its thing? Or perhaps avahi just isn't working at all on your network? What happens if you try pinging chefserver.local? Does it manage to resolve to an IP. For some reason |
OK, I honestly probably would of tried some other method of testing Deis if I had known Debian & Mac osx are what the Vagrant localdev set-up is based on day-to-day. I'll try to re-check my Virtualbox networking and local networking setup, but I dont actually have any other baremetal running Precise, only cloud and VMs and nesting vm's is asking for trouble its quite possibly my local network set-up also as OS subtleties also, I am using the HTML docs not the github readme, will cross check I am now getting stuck on Python dependencies, I think
sudo ln -fs $DEIS_DIR/client/deis.py /usr/local/bin/deis |
regarding Virtualbox, I did a quick search regarding Ubuntu 12 hosts and there is a small universe of issues and resolutions chefserver.local vagrant@chefserver:~$ ifconfig eth1 Link encap:Ethernet HWaddr 08:00:27:e4:b5:4c lo Link encap:Local Loopback vagrant@deis-controller:~$ ifconfig eth0 Link encap:Ethernet HWaddr 08:00:27:ca:00:14 eth1 Link encap:Ethernet HWaddr 08:00:27:25:ab:23 lo Link encap:Local Loopback lxcbr0 Link encap:Ethernet HWaddr ee:0c:e5:5e:95:c5 |
Regarding depencency management, you're using $ git clone git://github.com/opdemand/deis.git
$ cd deis
$ sudo apt-get install -y python-virtualenv
$ virtualenv venv && source venv/bin/activate
$ pip install -r requirements.txt |
Yes, it's always better to use Okay, so that's 2 bugs now:
But back to your issue @niccolox. From your pasted outputs you should be seeing an IP address of 192.168.61.99 when you |
hi, sorry with /etc/hosts IPs commented out ping gives nought, ping works fine with hosts IP explicitly set another possibility is that I am using Ubuntu's Network Manager at present, I will try disabling that and using /etc/network/interfaces http://www.stgraber.org/2012/02/24/dns-in-ubuntu-12-04/ I installed Ubuntu Desktop 12 for my baremetal dev server, so will look at going back to /etc/network/interfaces I suspect it might be a dnsmasq / avahi conflict |
starting again another documentation error, niccolo@mybaremetal: |
another Ubuntu specific permissions issue? niccolo@mybaremetal: am now at deis YAY ! |
deis register http://deis-controller.local same as this? |
Yes, these are permissions-specific issues. You're trying to make a symbolic link to a directory that you do not have write access to. These comments are getting way off-topic from the original pull request. @niccolox (or @tombh), could you please open new issues for the errors you're receiving, including:
That way, we can individually track the issues and make sure that each thread is clear and concise, and so that bugs do not get lost in the comments (thanks @tombh for summarizing them in #374 (comment) 😄). Also, please feel free to chat with us about any issues you may be having with getting set up on IRC at #deis on Freenode. Disclaimer: I am just a weekender on this project, so I do not represent OpDemand in any shape or form when I say this. This process just helps to isolate issues on everyone's end so we can track what's happening and where we can help 😄 |
the topic is Local Development instructions using Vagrant I am on topic imho i dont have time today to start new issues, will do that later in week |
and apologies, I am grumpy... I am tired and probably getting sick I do appreciate the help and will tidy up this issue list later in the week |
I tried again and noticed something I may have missed the first few times around the roundabout nginx ppa's are not installing, timing out, when installing deis-controller I can ping the keyserver from the deis-controller but the cookbook cant do the install might explain other areas still not convinced its not my networking, but having uncertainty around packages, dependencies etc makes it more interesting this is possibly the root cause of various errors
|
ok, its working I uninstalled and purged avahi and openssh-server and turned off firewall for install (need to check adding git and apt ppa ports as well as IP ignores) I did encounter a deis-worker error also I'll stop hammering this issue and apologies for being such a pain in the ar$3 my warts and all history of commands is |
Glad to hear that you got it all working :) I apologize if you took any offense to my comment. No hostilities were intended. I just personally like having one issue per bug is all, and it makes it a lot easier to track down issues and debug them as opposed to searching through "god bugs" to comment on specific issues to confirm patches or commits.
You aren't a pain in the arse! All of this information is great for debugging any problems we might be seeing in the code or in the documentation (as you have listed), so all of this is greatly appreciated. Thank you for taking the time to list the issues you were having. It helps us understand, document, and solve any bumps in the road that ourselves and others have experienced while working with deis :) |
Yay \o/ good work @niccolox! Right, I'll add PRs for those 2 bugs then... |
quick note managed to get the avahi dns issue resolved in Network Manager (on Ubuntu Desktop) turn off dnsmasq sudo nano /etc/NetworkManager/NetworkManager.conf [main] sudo service network-manager start in avahi uncomment hostname & domain-name sudo nano /etc/avahi/avahi-daemon.conf host-name=hostname sudo avahi-daemon --kill |
These new local development instructions fix #319. They've been tested extensively, including the use of a local Chef Server (versus Hosted Chef).