I have a Vagrant file setup up as so:
# -*- mode: ruby -*-
# vi: set ft=ruby :
Vagrant.configure("2") do |config|
config.vm.box = "hab-development"
config.ssh.username = "hab"
config.ssh.password = "hab"
end
This is a centOS 7 box I use for Habitat development, the only changes made being that I essentially ran yum update
and added the hab
user; Habitat is not installed. I then tried the following on this box:
[hab@localhost vagrant]$ hab --version
-bash: hab: command not found
[hab@localhost vagrant]$ curl --silent https://raw.githubusercontent.com/habitat-sh/habitat/master/components/hab/install.sh -o install.sh
[hab@localhost vagrant]$ chmod +x install.sh
[hab@localhost vagrant]$ sudo ./install.sh
--> hab-install: Installing Habitat 'hab' program
--> hab-install: Downloading via wget: https://api.bintray.com/content/habitat/stable/linux/x86_64/hab-%24latest-x86_64-linux.tar.gz?bt_package=hab-x86_64-linux
[..]
--> hab-install: Checking installed hab version
hab 0.83.0/20190712231625
--> hab-install: Installation of Habitat 'hab' program complete.
[hab@localhost vagrant]$ hab license accept
Accepting 1 product license...
✓ 1 product license accepted.
+---------------------------------------------+
[hab@localhost vagrant]$ sudo hab license accept
Accepting 1 product license...
✓ 1 product license accepted.
+---------------------------------------------+
[hab@localhost vagrant]$ hab pkg build .
✗✗✗
✗✗✗ Cannot find a release of package: core/hab-studio/0.83.0
✗✗✗
As you can see it install Hab version 0.83, and it fails to build my package due being unable to find a release of core/hab-studio/0.83.0
, however, I can see that it exists in the stable
channel on Builder as well as through the API:
[hab@localhost vagrant]$ curl --silent -X GET https://bldr.habitat.sh/v1/depot/channels/core/stable/pkgs/hab-studio/0.83.0 | jq
{
"range_start": 0,
"range_end": 2,
"total_count": 3,
"data": [
{
"origin": "core",
"name": "hab-studio",
"version": "0.83.0",
"release": "20190712234429"
},
{
"origin": "core",
"name": "hab-studio",
"version": "0.83.0",
"release": "20190712234434"
},
{
"origin": "core",
"name": "hab-studio",
"version": "0.83.0",
"release": "20190712234514"
}
]
}
What’s even stranger is that 0.83 will work through hab pkg install
, resulting in hab pkg build .
working:
[hab@localhost vagrant]$ hab --version
hab 0.83.0/20190712231625
[hab@localhost vagrant]$ sudo hab pkg install core/hab-studio
» Installing core/hab-studio
☁ Determining latest version of core/hab-studio in the 'stable' channel
↓ Downloading core/hab-studio/0.83.0/20190712234434
3.96 MB / 3.96 MB \ [===============================================================================================================] 100.00 % 9.01 MB/s
[..]
✓ Installed core/hab-studio/0.83.0/20190712234434
★ Install of core/hab-studio/0.83.0/20190712234434 complete with 40 new packages installed.
[hab@localhost vagrant]$ hab pkg build .
hab-studio: Destroying Studio at /hab/studios/vagrant ()
If I specify version 0.82 (after recreating the box):
[hab@localhost vagrant]$ hab --version
-bash: hab: command not found
[hab@localhost vagrant]$ curl --silent https://raw.githubusercontent.com/habitat-sh/habitat/master/components/hab/install.sh -o install.sh
[hab@localhost vagrant]$ chmod +x install.sh
[hab@localhost vagrant]$ sudo ./install.sh -v 0.82.0
--> hab-install: Installing Habitat 'hab' program
--> hab-install: Determining fully qualified version of package for `0.82.0'
[..]
--> hab-install: Checking installed hab version
hab 0.82.0/20190605214032
--> hab-install: Installation of Habitat 'hab' program complete.
[hab@localhost vagrant]$ hab license accept
Accepting 1 product license...
✓ 1 product license accepted.
+---------------------------------------------+
[hab@localhost vagrant]$ sudo hab license accept
Accepting 1 product license...
✓ 1 product license accepted.
+---------------------------------------------+
[hab@localhost vagrant]$ hab pkg build .
∵ Missing package for core/hab-studio/0.82.0
» Installing core/hab-studio/0.82.0
☁ Determining latest version of core/hab-studio/0.82.0 in the 'stable' channel
↓ Downloading core/hab-studio/0.82.0/20190605215758
3.94 MB / 3.94 MB | [===============================================================================================================] 100.00 % 9.07 MB/s
☛ Verifying core/hab-studio/0.82.0/20190605215758
✓ Installed core/hab-studio/0.82.0/20190605215758
★ Install of core/hab-studio/0.82.0/20190605215758 complete with 1 new packages installed.
[..]