mlstate/opa vagrant box installation issue - windows-7

I stumble upon the OPA framework for Javascript and decided to give it a shot.
Prefering a Vagrant Box, I did as suggested:
vagrant init mlstate/opa
vagrant up
but unfortunately it failed: Allegedly the box file is corrupted as bsdtar.exe couldn't even recognize the format while unpacking it.
What can I do, I need an official OPA Vagrant Box up and running on my Win7 machine to harness it.

I have the same problem on my Mac laptop. Installing the Vagrant Box from Vagrant Cloud does not seem to be working...
In alternative, you can try downloading the box file using the torrent on this link : http://opalang.org/Opa%20vagrant%20box.torrent
Once the box file is downloaded, issue the following commands :
vagrant box add opa-box file:///your_path_to_downloaded_file/opa.box
vagrant init opa-box
vagrant up
vagrant ssh
This works on my machine.

It's because the link leads to a redirect page to Google Drive. Bsdtar cannot open the archive because it's an HTML file. You can download it and add it using imikael21's instructions.
Here's the link it leads to: https://drive.google.com/uc?export=download&id=0B1UEOBxsn2GiN3ZpbFdMek1FNjQ
The attempted link: https://vagrantcloud.com/mlstate/opa/version/1/provider/virtualbox.box

Related

how to add a local box file into vagrant box

I'm learning vagrant( https://www.vagrantup.com/intro/getting-started/boxes.html ) ,because I can't directly "vagrant box add hashicorp/precise64" as is written on the page, first I downloaded hashicorp/precise64, then added it. It said "box:successfully added box 'hashicorp/premise64'(v0) for virtualbox". Then I configured vagrantfile as is written on the page.But when I "vagrant up",it said"Box 'hashicorp/premise64' could not be found'. ..... Process 0%......".I've been searching a solution, but can't find.Can someone help? Thanks!
Awesome to see you trying out Vagrant as it is a very useful tool. Some background on hashicorp/precise64, this box is popular yes, but is a dated version of Ubuntu 12.04. I would recommend using ubuntu/xenial64 which is Ubuntu 16.04. To use this you will first run:
vagrant init ubuntu/xenial64
then
vagrant up
This process may take some time as it is initializing the box for the first time. Once it is up and running feel free to ssh into it:
vagrant ssh
I also recommend taking a look at their quick start guide here.

What is the url to the ubuntu/xenial64 box url for vagrant?

Where to find the url for the ubuntu/xenial64.box?
I only see version-info at https://app.vagrantup.com/ubuntu/boxes/xenial64. But what is the url for the box download?
I simply do:
$ vagrant init ubuntu/xenial64
$ vagrant up
But get:
The box 'ubuntu/xenial64' could not be found.
So I guess I need to put something in config.vm.box_url, but what?
If you keep clicking around and following the links on the Vagrant Cloud website, then eventually you find that the box is hosted at http://cloud-images.ubuntu.com
From there, you can find the latest version of the xenial box specifically hosted at:
http://cloud-images.ubuntu.com/xenial/current/
Direct link to Vagrant box: http://cloud-images.ubuntu.com/xenial/current/xenial-server-cloudimg-amd64-vagrant.box
Sorry, was version mismatch. Newer vagrant works just fine.
I had Vagrant 1.4.x (on linux mint 17.1) and virtualbox 5. Online boxes were not found. Now I have Vagrant 1.8.1 (on linux mint 18.2) and virtualbox 5 and everything works as expected from the Vagrant manual (no url needed).
Thanks and sorry for waisting your time..
--
Oscar.

Spark VM box NOT getting created in windows

I am new to spark. Infact, I started learning it from today from edX.I am setting up my environment in windows so that sparkvm could be used.Following are the upto date Installations that I did on my PC.
Installed Virtualbox
Installed Vagrant
created a directory
C:\Users\Macro\myvagrant
and copy VagrantFile from (https://github.com/spark-mooc/mooc-setup/archive/master.zip)
Then I executed the following command from the specified path in dos.
vagrant up but the following message is coming every time.
How would I get out of this mess?
Update:
After downloading the file and executing the suggested code.I got following error.
vagrant is not able to download the box from its cloud.
you can try the following:
if you're behind a proxy, set the proxy :
export http_proxy=http://your.proxyhost.server:port/
export https_proxy=https://your.proxyhost.server:port/
vagrant up
download the box directly and install: download from https://atlas.hashicorp.com/sparkmooc/boxes/base2/versions/0.0.7.1/providers/virtualbox.box directly or you can use a downloader tool (such as wget as below)
wget https://atlas.hashicorp.com/sparkmooc/boxes/base2/versions/0.0.7.1/providers/virtualbox.box
Then you'll need to install the box
vagrant box add sparkmooc/base2 <location of downloaded box file>
vagrant up

Vagrant, can't download box

not sure why I'm having this issue but I can't add vagrant boxes.
Using windows 10, tried on powershell and simple command prompt. same issue. It's a relatively fresh install of windows. Maybe I'm missing some required package?
first i tried this command:
vagrant box add hashicorp/precise32
and got the error:
The box 'hashicorp/precise32' could not be found or
could not be accessed in the remote catalog. If this is a private
box on HashiCorp's Atlas, please verify you're logged in via
`vagrant login`. Also, please double-check the name. The expanded
URL and error message are shown below:
URL: ["https://atlas.hashicorp.com/hashicorp/precise32"]
Error:
So I downloaded the box manually and tried this:
vagrant box add base64 file:///D:/downloads/vagrant_boxes/precise64.box
And got this error again:
==> box: Box file was not detected as metadata. Adding it directly...
==> box: Adding box 'base64' (v0) for provider:
box: Unpacking necessary files from: file:///D:/downloads/vagrant_boxes/precise64.box
box:
An error occurred while downloading the remote file. The error
message, if any, is reproduced below. Please fix this error and try
again.
The libraries on current version (as of this date) OSX don't support the version of curl bundled with Vagrant 1.8.7. I installed 1.8.6 and everything worked like a champ. To test this theory:
cd /opt/vagrant/embedded/bin
./curl --help
If you get a 'normal' reply than you should be fine or there's something else wrong.
I was using vagrant v1.8.0 when this happened. Later that day vagrant v1.8.1 was released. I didn't try that, instead I shifted back to v1.7.4 and the issue was gone.
I've been resolving this issue since I installed vagrant 1.8.1, I tried to installed lower version but i came up with the same problem. Hopefully, I solve it here:
first make sure you installed Microsoft Visual C++ 2010 SP1 Redistributable.
here is for 64bit https://www.microsoft.com/en-us/download/details.aspx?id=13523
next, download ssl version of curl in my case 64bit also. here:
https://curl.haxx.se/latest.cgi?curl=win64-ssl-sspi
now extract the curl.exe to C:\Vagrant\embedded\bin. please see your installation directory.
and then done. if your not using ssl try the no-ssl version of curl. hope helps
Check the C: \ HashiCorp \ Vagrant \ embedded \ bin \ curl.exe
case give an error, there is your problem.
To solve, just download gitbash, console2, cmder, etc ... you have curl installed, or try http://www.confusedbycode.com/curl/.
however strongly recommend gitbash or cmder
https://atlas.hashicorp.com/hashicorp/boxes/precise32
base on the offical URL.. there is only virutal box provider.
try below command:
vagrant init hashicorp/precise32; vagrant up --provider virtualbox
For MacOS users whom reinstalling new version of vagrant doesn't help:
sudo mv /opt/vagrant/embedded/lib/libiconv.2.dylib /opt/vagrant/embedded/lib/libiconv.2.dylib_
brew install libiconv
brew link --force libiconv
credits to: https://github.com/mitchellh/vagrant/issues/5782
You don`t need to add the box. Init instead of this:
vagrant init hashicorp/precise32
vagrant up
vagrant ssh
Hope it will be added in boxes list automatically.
If you want to set up local box - add it getting few steps:
D:
cd downloads/vagrant_boxes
vagrant box add base64 precise64.box
vagrant up
vagrant ssh

Download vagrant boxes via tutorial syntax

About to start tinkering with vagrant, looking at the second page of the tutorial
vagrant box add hashicorp/precise64
When I run this command however, I get
This command was not invoked properly. The help for this command is
available below.
Usage: vagrant box add [--provider provider] [-h]
I can see it takes a name before the URL, so I tried
vagrant box add ubuntu/trusty64 https://atlas.hashicorp.com/ubuntu/boxes/trusty64
but I get another error
bsdtar: Error opening archive: Unrecognized archive format
I want to download ubuntu/trusty64 specifically. What am I doing wrong?
You are using old version of Vagrant with newest documentation. You either need to update your Vagrant or read old docs.
Boxes system was revamped in 1.5 so your Vagrant is older than 1.5
I used a different site to get the boxes. The url needs to have a .box file
https://oss-binaries.phusionpassenger.com/vagrant/boxes/latest/ubuntu-14.04-amd64-vbox.box

Resources