Problems getting started on Ubuntu?
wysisoft opened this issue · 6 comments
on a fresh minimal install of ubuntu 20.04, per https://github.com/unikraft/kraft I run
sudo apt-get install -y --no-install-recommends build-essential libncurses-dev libyaml-dev flex git wget socat bison unzip uuid-runtime;
then I try to run
pip3 install git+https://github.com/unikraft/kraft.git@staging
but pip3 isnt installed so I run
sudo apt-get install python3-pip
then I run
pip3 install git+https://github.com/unikraft/kraft.git@staging and it runs but it doesn't seem create/change my system in any way, I type kraft afterwards it says kraft not found.
I run sudo pip3 install git+https://github.com/unikraft/kraft.git@staging and it seems to build kraft, but the kraft command doesnt run correctly, for example if I run
sudo kraft list
it says that I need to create my own github access token, which I do, but it doesn't seem to work. If I try to run kraft build or kraft up, it says no manifests found.
I noticed that by installing kraft using pip you get in ~/.local/bin
. Consider adding this to your path and see if this solves the problem.
For the access token issue, you'll need to generate a Github token, give it repo:public_repo access, and export it as the environment variable UK_KRAFT_GITHUB_TOKEN and rerun kraft.
You can find details on generating and using the GitHub access token here. Also check out the documentation on creating and running an app with kraft. If you don't find a solution there, please provide some more output (e.g. the structure of your working directory, the output of the commands that fail).
Is it fair to ask for the "getting started" guide to add in the sudo portions and pip3 installation step?
I notice that the command export UK_KRAFT_GITHUB_TOKEN=token kraft list update works for me, so I get past this problem.
I also notice that when downloading a template such as helloworld or httpreply that I need to browse into the /home/user/.unikernel/apps directory and run kraft build/kraft run from this directory
Probably using kraft up -t template_name@branch template_name
will get you started. If you follow the tutorial on USoC 2021 website and try kraft up -t helloworld@staging ./my_first_unikernel
, it won't work for some reason. It works when you give app the same name as the template.
Is it fair to ask for the "getting started" guide to add in the sudo portions and pip3 installation step?
I notice that the command export UK_KRAFT_GITHUB_TOKEN=token kraft list update works for me, so I get past this problem.
I also notice that when downloading a template such as helloworld or httpreply that I need to browse into the /home/user/.unikernel/apps directory and run kraft build/kraft run from this directory
I will look into updating the installation and first usage details on the documentation website.
Yes, you need to be in the app directory when running the kraft commands, not necessarily the .unikraft/apps
directory, but the one where you download the app into. kraft
will look for the unikraft core and libraries in the ../../unikraft
and ../../libs
directories unless specified otherwise by the UK_ROOT
and UK_LIBS
environment variables. This should also be on the docs website, I will look into that.
All good now? Can we close this issue?