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

Adding vagrant to make developer setup trivial #8

Merged
merged 3 commits into from
Apr 29, 2014
Merged

Adding vagrant to make developer setup trivial #8

merged 3 commits into from
Apr 29, 2014

Conversation

jacksingleton
Copy link
Contributor

Vagrant (http://www.vagrantup.com) allows us to automate the developer workstation setup, which should help lower the barrier to entry for potential contributors.

I've added a Vagrantfile, set up provisioning to automatically install all dependencies, and updated the README with comprehensive instructions to get the app running locally.

@sielicki
Copy link

great idea.

@hoffmabc
Copy link
Contributor

I'm going to try and integrate this in with the OpenBazaar fork as well. Nice addition. https://github.com/hoffmabc/OpenBazaar

@johnalexhebert
Copy link

Let me know if I can help. I was planning to create the Vagrantfile too and send you a pull request.

When it is ready, do you mind if I post an announcement to http://www.reddit.com/r/Bitcoin/comments/23vo5s/petition_to_change_the_name_of_dark_market_to/? May help to end that debate, or encourage others to fork OpenBazaar as well.

@hoffmabc
Copy link
Contributor

@johnalexhebert I am currently just cleaning up the code and looking around to determine how usable this is for putting a production quality build out there. I'm looking for more participation and discussion as well. If you want to send the Vagrant PR then I'd be glad to incorporate it.

@johnalexhebert
Copy link

On Mon, Apr 28, 2014 at 4:55 AM, aha x@aharonic.net wrote:

Thanks to some quick hacking by Jack Singleton, there is now a Vagrant VM
for Dark Market suitable for testing. Jack forked the darkmarket repo and
created the Vagrantfile to build the VM.
Hi,

Thanks for the quick hack!

Am trying to make this work and run into a few errors:

xxxx@xx ./run_dev.sh
python: no process found
python2: no process found
/usr/bin/python2
xxxx@xx ~/darkmarket $ Traceback (most recent call last):
Traceback (most recent call last):
File "node/tornadoloop.py", line 4, in
File "node/tornadoloop.py", line 4, in
import tornado.ioloop
import tornado.ioloop
ImportErrorImportError: : No module named tornado.ioloopNo module named
tornado.ioloop

Traceback (most recent call last):
File "node/tornadoloop.py", line 4, in
import tornado.ioloop
ImportError: No module named tornado.ioloop
Traceback (most recent call last):
File "node/tornadoloop.py", line 4, in
import tornado.ioloop
ImportError: No module named tornado.ioloop

NOTE:

I did the xxxx@xx ./run_dev.sh
in ~/darkmarket
Because the suggested command:
cd /vagrant && ./run_dev.sh
produced:
bash: cd: /vagrant: No such file or directory

Looking up the directory, vagrant was installed as:
.vagrant.d

The only "vagrant" only named directories are under usr/share and
/usr/lib/ruby/vendor_ruby
(attempting to run ./run_dev.sh from each of these failed..)

Am running this under mint linux 15..

Also might be relevant, according to:
/opt/vagrant/embedded/gems/gems/vagrant-1.5.4/ I suppose vagrant's version
is 1.5.4..

@johnalexhebert
Copy link

Try 'vagrant up && vagrant ssh', then do 'cd /vagrant && ./run_dev.sh'.
Running that will connect you to the darkmarket VM.

The text file Vagrantfile defines the darkmarket VM with the scripts and directories for both /vagrant and ~/darkmarket in it.

@hoffmabc
Copy link
Contributor

Hey if you guys want to, it would be good to submit the PR over on the OpenBazaar repo as well because there probably won't be any new dev here for a while.

@coffeecult
Copy link

Hi.. Per suggested am here and off the unsystem list.. (aharonic.net - a different nick here..)..

So.. Yes.. I tried reinstalling and also downloading from jacksingleton/darkmarket.git - but no joy.. I keep hitting that strange message - /vagrant: No such file or directory

Am I missing something? Do I need to copy and/or move some files manually?

Are there some dependencies that might be missing?

Cheers and thanks!

@johnalexhebert
Copy link

Follow these steps as a test. Copy and paste the console output to a text file. We may need it to debug your issue.

  • 'cd /path/to/darkmarket/'
  • 'vagrant destroy'
  • 'cd ~' # change to your home dir
  • 'rm -rf /path/to/darkmarket' # put in the correct path to the darkmarket git clone
  • 'git clone https://github.com/jacksingleton/darkmarket/ && cd darkmarket'
  • vagrant up && vagrant ssh
  • *** what happens when you run 'vagrant ssh'?
  • cd /vagrant && ./run_dev.sh
  • Open http://localhost:8888

On Mon, Apr 28, 2014 at 6:00 PM, aha notifications@github.com wrote:

Hi.. Per suggested am here and off the unsystem list.. (aharonic.net - a
different nick here..)..

So.. Yes.. I tried reinstalling and also downloading from
jacksingleton/darkmarket.git - but no joy.. I keep hitting that strange
message - /vagrant: No such file or directory

Am I missing something? Do I need to copy and/or move some files manually?

Are there some dependencies that might be missing?

Cheers and thanks!


Reply to this email directly or view it on GitHubhttps://github.com//pull/8#issuecomment-41624838
.

genjix pushed a commit that referenced this pull request Apr 29, 2014
Adding vagrant to make developer setup trivial
@genjix genjix merged commit 89cab82 into darkwallet:master Apr 29, 2014
@genjix
Copy link
Contributor

genjix commented Apr 29, 2014

added you all as devs

@coffeecult
Copy link

Hi,

Thanks for the suggestion!

Seems like vagrant up & vagrant ssh (both together and ssh command on its own, gives:
/home/aha/darkmarket/Vagrantfile:7:in <top (required)>': undefined methodconfigure' for Vagrant:Module (NoMethodError)

The whole process is detailed bellow.. Seems like there is something to do with Vagrantfile:7:in <top (required)>': undefined methodconfigure' for Vagrant:Module (NoMethodError)
Because this error came following the vagrant destroy command as well as the ssh..

Hope this helps somehow to fix this..

Cheers!


process:

---- darkmarket directory ---
/home/aha/darkmarket

---- output after destroy ---

aha@xxx ~/darkmarket $ vagrant destroy
/home/aha/darkmarket/Vagrantfile:7:in <top (required)>': undefined methodconfigure' for Vagrant:Module (NoMethodError)
from /usr/lib/ruby/vendor_ruby/vagrant/config/loader.rb:115:in load' from /usr/lib/ruby/vendor_ruby/vagrant/config/loader.rb:115:inblock in procs_for_source'
from /usr/lib/ruby/vendor_ruby/vagrant/config.rb:41:in block in capture_configures' from <internal:prelude>:10:insynchronize'
from /usr/lib/ruby/vendor_ruby/vagrant/config.rb:36:in capture_configures' from /usr/lib/ruby/vendor_ruby/vagrant/config/loader.rb:114:inprocs_for_source'
from /usr/lib/ruby/vendor_ruby/vagrant/config/loader.rb:51:in block in set' from /usr/lib/ruby/vendor_ruby/vagrant/config/loader.rb:45:ineach'
from /usr/lib/ruby/vendor_ruby/vagrant/config/loader.rb:45:in set' from /usr/lib/ruby/vendor_ruby/vagrant/environment.rb:377:inblock in load_config!'
from /usr/lib/ruby/vendor_ruby/vagrant/environment.rb:392:in call' from /usr/lib/ruby/vendor_ruby/vagrant/environment.rb:392:inload_config!'
from /usr/lib/ruby/vendor_ruby/vagrant/environment.rb:327:in load!' from /usr/bin/vagrant:40:in

'

--- re cloning and rentring dark market directory ----
$ git clone https://github.com/jacksingleton/darkmarket/ && cd darkmarket
Cloning into 'darkmarket'...
remote: Reusing existing pack: 358, done.
remote: Counting objects: 10, done.
remote: Compressing objects: 100% (10/10), done.
remote: Total 368 (delta 3), reused 0 (delta 0)
Receiving objects: 100% (368/368), 491.13 KiB | 504 KiB/s, done.
Resolving deltas: 100% (167/167), done.
aha@xxx ~/darkmarket $ pwd
/home/aha/darkmarket

-------- loading vagrant -----
vagrant up && vagrant ssh
/home/aha/darkmarket/Vagrantfile:7:in <top (required)>': undefined methodconfigure' for Vagrant:Module (NoMethodError)
from /usr/lib/ruby/vendor_ruby/vagrant/config/loader.rb:115:in load' from /usr/lib/ruby/vendor_ruby/vagrant/config/loader.rb:115:inblock in procs_for_source'
from /usr/lib/ruby/vendor_ruby/vagrant/config.rb:41:in block in capture_configures' from <internal:prelude>:10:insynchronize'
from /usr/lib/ruby/vendor_ruby/vagrant/config.rb:36:in capture_configures' from /usr/lib/ruby/vendor_ruby/vagrant/config/loader.rb:114:inprocs_for_source'
from /usr/lib/ruby/vendor_ruby/vagrant/config/loader.rb:51:in block in set' from /usr/lib/ruby/vendor_ruby/vagrant/config/loader.rb:45:ineach'
from /usr/lib/ruby/vendor_ruby/vagrant/config/loader.rb:45:in set' from /usr/lib/ruby/vendor_ruby/vagrant/environment.rb:377:inblock in load_config!'
from /usr/lib/ruby/vendor_ruby/vagrant/environment.rb:392:in call' from /usr/lib/ruby/vendor_ruby/vagrant/environment.rb:392:inload_config!'
from /usr/lib/ruby/vendor_ruby/vagrant/environment.rb:327:in load!' from /usr/bin/vagrant:40:in

'

------- vagrant ssh on its own ----

vagrant ssh
/home/aha/darkmarket/Vagrantfile:7:in <top (required)>': undefined methodconfigure' for Vagrant:Module (NoMethodError)
from /usr/lib/ruby/vendor_ruby/vagrant/config/loader.rb:115:in load' from /usr/lib/ruby/vendor_ruby/vagrant/config/loader.rb:115:inblock in procs_for_source'
from /usr/lib/ruby/vendor_ruby/vagrant/config.rb:41:in block in capture_configures' from <internal:prelude>:10:insynchronize'
from /usr/lib/ruby/vendor_ruby/vagrant/config.rb:36:in capture_configures' from /usr/lib/ruby/vendor_ruby/vagrant/config/loader.rb:114:inprocs_for_source'
from /usr/lib/ruby/vendor_ruby/vagrant/config/loader.rb:51:in block in set' from /usr/lib/ruby/vendor_ruby/vagrant/config/loader.rb:45:ineach'
from /usr/lib/ruby/vendor_ruby/vagrant/config/loader.rb:45:in set' from /usr/lib/ruby/vendor_ruby/vagrant/environment.rb:377:inblock in load_config!'
from /usr/lib/ruby/vendor_ruby/vagrant/environment.rb:392:in call' from /usr/lib/ruby/vendor_ruby/vagrant/environment.rb:392:inload_config!'
from /usr/lib/ruby/vendor_ruby/vagrant/environment.rb:327:in load!' from /usr/bin/vagrant:40:in

'

----- cd vagrant and dev.sh ----

cd /vagrant && ./run_dev.sh
bash: cd: /vagrant: No such file or directory

@johnalexhebert
Copy link

Cool, this helps a lot! Definitely a problem with vagrant. Let's tackle
that first.

Confirm that any virtual machines are stopped. Run 'ps -ef | grep -i vbox'
and let me know the result. It is probably a good idea to just reboot your
box.

Let's start with a clean slate and remove Vagrant. Then follow the steps on
http://docs.vagrantup.com/v2/getting-started/index.html and let me know the
results from the command 'vagrant up && vagrant ssh'. If that works, that
will confirm Vagrant and its dependencies are good to go.

John

On Tue, Apr 29, 2014 at 2:54 AM, aha notifications@github.com wrote:

Hi,

Thanks for the suggestion!

Seems like vagrant up & vagrant ssh (both together and ssh command on its
own, gives:
/home/aha/darkmarket/Vagrantfile:7:in <top (required)>': undefined methodconfigure'
for Vagrant:Module (NoMethodError)

The whole process is detailed bellow.. Seems like there is something to do
with Vagrantfile:7:in <top (required)>': undefined methodconfigure' for
Vagrant:Module (NoMethodError)
Because this error came following the vagrant destroy command as well as
the ssh..

Hope this helps somehow to fix this..

Cheers!

process:

---- darkmarket directory ---
/home/aha/darkmarket

---- output after destroy ---

aha@xxx ~/darkmarket $ vagrant destroy
/home/aha/darkmarket/Vagrantfile:7:in <top (required)>': undefined methodconfigure'
for Vagrant:Module (NoMethodError)
from /usr/lib/ruby/vendor_ruby/vagrant/config/loader.rb:115:in load'
from /usr/lib/ruby/vendor_ruby/vagrant/config/loader.rb:115:inblock in
procs_for_source'
from /usr/lib/ruby/vendor_ruby/vagrant/config.rb:41:in block in
capture_configures'
from internal:prelude:10:insynchronize'
from /usr/lib/ruby/vendor_ruby/vagrant/config.rb:36:in capture_configures'
from /usr/lib/ruby/vendor_ruby/vagrant/config/loader.rb:114:in
procs_for_source'
from /usr/lib/ruby/vendor_ruby/vagrant/config/loader.rb:51:in block in
set'
from /usr/lib/ruby/vendor_ruby/vagrant/config/loader.rb:45:ineach'
from /usr/lib/ruby/vendor_ruby/vagrant/config/loader.rb:45:in set'
from /usr/lib/ruby/vendor_ruby/vagrant/environment.rb:377:inblock in
load_config!'
from /usr/lib/ruby/vendor_ruby/vagrant/environment.rb:392:in call'
from /usr/lib/ruby/vendor_ruby/vagrant/environment.rb:392:inload_config!'
from /usr/lib/ruby/vendor_ruby/vagrant/environment.rb:327:in load!'
from /usr/bin/vagrant:40:in'

--- re cloning and rentring dark market directory ----
$ git clone https://github.com/jacksingleton/darkmarket/ && cd darkmarket
Cloning into 'darkmarket'...
remote: Reusing existing pack: 358, done.
remote: Counting objects: 10, done.
remote: Compressing objects: 100% (10/10), done.
remote: Total 368 (delta 3), reused 0 (delta 0)
Receiving objects: 100% (368/368), 491.13 KiB | 504 KiB/s, done.
Resolving deltas: 100% (167/167), done.
aha@xxx ~/darkmarket $ pwd
/home/aha/darkmarket

-------- loading vagrant -----

vagrant up && vagrant ssh
/home/aha/darkmarket/Vagrantfile:7:in <top (required)>': undefined methodconfigure'
for Vagrant:Module (NoMethodError)
from /usr/lib/ruby/vendor_ruby/vagrant/config/loader.rb:115:in load'
from /usr/lib/ruby/vendor_ruby/vagrant/config/loader.rb:115:inblock in
procs_for_source'
from /usr/lib/ruby/vendor_ruby/vagrant/config.rb:41:in block in
capture_configures'
from internal:prelude:10:insynchronize'
from /usr/lib/ruby/vendor_ruby/vagrant/config.rb:36:in capture_configures'
from /usr/lib/ruby/vendor_ruby/vagrant/config/loader.rb:114:in
procs_for_source'
from /usr/lib/ruby/vendor_ruby/vagrant/config/loader.rb:51:in block in
set'
from /usr/lib/ruby/vendor_ruby/vagrant/config/loader.rb:45:ineach'
from /usr/lib/ruby/vendor_ruby/vagrant/config/loader.rb:45:in set'
from /usr/lib/ruby/vendor_ruby/vagrant/environment.rb:377:inblock in
load_config!'
from /usr/lib/ruby/vendor_ruby/vagrant/environment.rb:392:in call'
from /usr/lib/ruby/vendor_ruby/vagrant/environment.rb:392:inload_config!'
from /usr/lib/ruby/vendor_ruby/vagrant/environment.rb:327:in load!'
from /usr/bin/vagrant:40:in'

------- vagrant ssh on its own ----

vagrant ssh
/home/aha/darkmarket/Vagrantfile:7:in <top (required)>': undefined methodconfigure'
for Vagrant:Module (NoMethodError)
from /usr/lib/ruby/vendor_ruby/vagrant/config/loader.rb:115:in load'
from /usr/lib/ruby/vendor_ruby/vagrant/config/loader.rb:115:inblock in
procs_for_source'
from /usr/lib/ruby/vendor_ruby/vagrant/config.rb:41:in block in
capture_configures'
from internal:prelude:10:insynchronize'
from /usr/lib/ruby/vendor_ruby/vagrant/config.rb:36:in capture_configures'
from /usr/lib/ruby/vendor_ruby/vagrant/config/loader.rb:114:in
procs_for_source'
from /usr/lib/ruby/vendor_ruby/vagrant/config/loader.rb:51:in block in
set'
from /usr/lib/ruby/vendor_ruby/vagrant/config/loader.rb:45:ineach'
from /usr/lib/ruby/vendor_ruby/vagrant/config/loader.rb:45:in set'
from /usr/lib/ruby/vendor_ruby/vagrant/environment.rb:377:inblock in
load_config!'
from /usr/lib/ruby/vendor_ruby/vagrant/environment.rb:392:in call'
from /usr/lib/ruby/vendor_ruby/vagrant/environment.rb:392:inload_config!'
from /usr/lib/ruby/vendor_ruby/vagrant/environment.rb:327:in load!'
from /usr/bin/vagrant:40:in'

----- cd vagrant and dev.sh ----

cd /vagrant && ./run_dev.sh
bash: cd: /vagrant: No such file or directory


Reply to this email directly or view it on GitHubhttps://github.com//pull/8#issuecomment-41650025
.

@coffeecult
Copy link

Hi,

Pheeeuwww.. Failed a few times.. Seems like vagrant didn't let me name the box other than "base".. So, only after naming the box "base" I got the following out put that seems to indicate vagrant is cool and running..

What do I need to do next?

Re install darkmarket? If so, any recommended version? (seeing as recently there have been a few mergers here..)

Cheers and many thanks!!

xxx


aha@xxx ~ $ vagrant box add base http://files.vagrantup.com/precise32.box
[vagrant] Downloading with Vagrant::Downloaders::HTTP...
[vagrant] Downloading box: http://files.vagrantup.com/precise32.box
[vagrant] Downloading box: http://hashicorp-files.vagrantup.com/precise32.box
[vagrant] Extracting box...
[vagrant] Verifying box...
[vagrant] Cleaning up downloaded box...
aha@xxx ~ $ vagrant up
[default] Importing base box 'base'...
[default] The guest additions on this VM do not match the install version of
VirtualBox! This may cause things such as forwarded ports, shared
folders, and more to not work properly. If any of those things fail on
this machine, please update the guest additions and repackage the
box.

Guest Additions Version: 4.2.0
VirtualBox Version: 4.1.18
[default] Matching MAC address for NAT networking...
[default] Clearing any previously set forwarded ports...
[default] Forwarding ports...
[default] -- 22 => 2222 (adapter 1)
[default] Creating shared folders metadata...
[default] Clearing any previously set network interfaces...
[default] Booting VM...
[default] Waiting for VM to boot. This can take a few minutes.
[default] VM booted and ready for use!
[default] Mounting shared folders...
[default] -- v-root: /vagrant
aha@xxx ~ $ vagrant ssh
Welcome to Ubuntu 12.04 LTS (GNU/Linux 3.2.0-23-generic-pae i686)

  • Documentation: https://help.ubuntu.com/
    Welcome to your Vagrant-built virtual machine.
    Last login: Fri Sep 14 06:22:31 2012 from 10.0.2.2
    vagrant@precise32:~$

@johnalexhebert
Copy link

Dark Market developers are now pointed to
https://github.com/OpenBazaar/OpenBazaar. Let's start testing again with
OpenBazaar. There is no difference concerning the bug you are seeing.

On Wed, Apr 30, 2014 at 4:51 AM, aha notifications@github.com wrote:

Hi,

Pheeeuwww.. Failed a few times.. Seems like vagrant didn't let me name the
box other than "base".. So, only after naming the box "base" I got the
following out put that seems to indicate vagrant is cool and running..

What do I need to do next?

Re install darkmarket? If so, any recommended version? (seeing as recently
there have been a few mergers here..)

Cheers and many thanks!!

xxx

aha@xxx ~ $ vagrant box add base http://files.vagrantup.com/precise32.box
[vagrant] Downloading with Vagrant::Downloaders::HTTP...
[vagrant] Downloading box: http://files.vagrantup.com/precise32.box
[vagrant] Downloading box:
http://hashicorp-files.vagrantup.com/precise32.box
[vagrant] Extracting box...
[vagrant] Verifying box...
[vagrant] Cleaning up downloaded box...
aha@xxx ~ $ vagrant up
[default] Importing base box 'base'...
[default] The guest additions on this VM do not match the install version
of
VirtualBox! This may cause things such as forwarded ports, shared
folders, and more to not work properly. If any of those things fail on
this machine, please update the guest additions and repackage the
box.

Guest Additions Version: 4.2.0
VirtualBox Version: 4.1.18
[default] Matching MAC address for NAT networking...
[default] Clearing any previously set forwarded ports...
[default] Forwarding ports...
[default] -- 22 => 2222 (adapter 1)
[default] Creating shared folders metadata...
[default] Clearing any previously set network interfaces...
[default] Booting VM...
[default] Waiting for VM to boot. This can take a few minutes.
[default] VM booted and ready for use!
[default] Mounting shared folders...
[default] -- v-root: /vagrant
aha@xxx ~ $ vagrant ssh
Welcome to Ubuntu 12.04 LTS (GNU/Linux 3.2.0-23-generic-pae i686)

  • Documentation: https://help.ubuntu.com/ Welcome to your
    Vagrant-built virtual machine. Last login: Fri Sep 14 06:22:31 2012 from
    10.0.2.2 vagrant@precise32:~$


Reply to this email directly or view it on GitHubhttps://github.com//pull/8#issuecomment-41778987
.

@coffeecult
Copy link

hi,

hummm... still no joy.. strange..

i get:

aha@xxx ~/OpenBazaar $ cd /vagrant && ./run_dev.sh
bash: cd: /vagrant: No such file or directory

tried just the cd, and nothing changed:
aha@xxx ~/OpenBazaar $ cd /vagrant
bash: cd: /vagrant: No such file or directory

cheers and many thanks!

@johnalexhebert
Copy link

Don't reply to this message. Instead go to
https://github.com/OpenBazaar/OpenBazaar/blob/master/README.md follow the
instructions and make comments to this issue
https://github.com/OpenBazaar/OpenBazaar/issues/20.

On Wed, Apr 30, 2014 at 5:23 PM, aha notifications@github.com wrote:

hi,

hummm... still no joy.. strange..

i get:

aha@xxx ~/OpenBazaar $ cd /vagrant && ./run_dev.sh

bash: cd: /vagrant: No such file or directory

tried just the cd, and nothing changed:
aha@xxx ~/OpenBazaar $ cd /vagrant

bash: cd: /vagrant: No such file or directory

cheers and many thanks!


Reply to this email directly or view it on GitHubhttps://github.com//pull/8#issuecomment-41858979
.

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