Open Jefnull opened 6 years ago
It does require root privileges when running for the first time. That's because when you run the sbox
script for the first time, it downloads 2 additional binaries and puts them inside /usr/local/sf
. If you are getting the message about failed to pass an integrity check
, I think something may have gone wrong while it was downloading the first of these 2 that we call "bootstrap". Can you tell me the full name of the bootstrap it downloaded inside /usr/local/sf
?
In general, if you pass a --debug
flag, you should get some additional debug logging that should help.
File is named bootstrap-0.1.0-linux-amd64
running as sudo with debug looks successful,
Required component exists at /usr/local/sf/cli/bootstrap-0.1.0-linux-amd64
Integrity check on required components passed
Running /usr/local/sf/cli/bootstrap-0.1.0-linux-amd64 --original-command ./sbox-cli/wrapper-0.1.0-linux-amd64 install --debug
Sandbox CLI installed globally, as the 'sbox' command
without sudo gives
Required component exists at /usr/local/sf/cli/bootstrap-0.1.0-linux-amd64
Expected signature d2f9a2abb8e32c08e6f207e0c8446ff407828799bb25ba6d989b69671c20d617 but was <missing file>
Some required components failed to pass an integrity check
Performing some preparatory work (subsequent runs should be faster)
No proxy is configured - none will be used
Downloading component http://updates.stack.foundation/bootstrap-0.1.0/bootstrap-0.1.0-linux-amd64
Downloading to /usr/local/sf/cli/bootstrap-0.1.0-linux-amd64
Downloading [====================================================] 3952 / 3952 KB
Expected signature d2f9a2abb8e32c08e6f207e0c8446ff407828799bb25ba6d989b69671c20d617 but was <missing file>
Some required components failed to pass an integrity check
I think I see what's going on, thanks for the logs. It is indeed a bug. We're setting the permissions on the bootstrap binary to be RWX for owner, and only X for group and other. That needs to be RX for group and other. We will need to fix that, Unfortunately, it will likely be Monday before we have a fix for that. In the meantime, setting the permissions on bootstrap to be 755 (RWX for owner, and RX for group and other) should allow you to run as a regular user.
Just to give you a quick overview of the sequence when you run the sbox
script:
sbox
in a project directory, it executes one of the binaries inside of the sbox-cli
folder within the same folder that matches the current platform - for example, on linux, it might run wrapper-xxx-linux-amd64
We need to add this detail to the documentation - I think it helps to understand what's happening behind the scenes.
When I run sbox status
I get
The Sandbox VM and Kubernetes cluster are up and running, ready to run workflows
Kubernetes Dashboard is not available: Error getting kubernetes client: Error creating kubeConfig: invalid configuration: no configuration has been provided
and with debug flag
Required component exists at /usr/local/sf/cli/bootstrap-0.1.0-linux-amd64
Integrity check on required components passed
Running /usr/local/sf/cli/bootstrap-0.1.0-linux-amd64 --original-command ./sbox-cli/wrapper-0.1.0-linux-amd64 status --debug
The Sandbox VM and Kubernetes cluster are up and running, ready to run workflows
Kubernetes Dashboard is not available: Error getting kubernetes client: Error creating kubeConfig: invalid configuration: no configuration has been provided
Is this related to this issue? It seems like missing installation stuff aswell
The status
command appears to also have a bug in linux, apologies. You should be able to run a docker-env
command to get the IP of the VM. The Kubernetes dashboard is available then at http://{VM IP}:30000
. Thanks again for reporting this - unfortunately again, it won't be till Monday earliest that we'll have a fix.
Were you able to run a workflow?
The workflow runs, I just needed the IP. docker-env
worked and I was able to access from the web interface
Most of these issues are now fixed with a release we did on Monday. The wrapper sets the permissions of the bootstrap file correctly. The status command is now fixed to show the k8s dashboard URL correctly.
I am going to keep the issue open because the original issue you reported might be an issue (though you saw the side effect of another issue) - running the install
command may not work correctly if sudo is not used.
Is Sudo required to run sbox?
when I run
./sbox install
as my regular user, I getIf sudo is required, perhaps a more helpful error message would be helpful
Also, when I run
sbox init
thesbox
command does not get created. not for me or as sudo.Is there a place I can find logs to get more details?