From 8787e4a6c163a0a503ac6428ad366754e46ac15e Mon Sep 17 00:00:00 2001 From: utam0k Date: Thu, 29 Jun 2023 12:46:22 +0000 Subject: [PATCH] Quick install guide Signed-off-by: utam0k --- README.md | 5 ++++- docs/src/user/basic_setup.md | 43 +++++++++++++++++++++++------------- 2 files changed, 32 insertions(+), 16 deletions(-) diff --git a/README.md b/README.md index 93f9a4aa..1ac3a4a2 100644 --- a/README.md +++ b/README.md @@ -12,6 +12,10 @@ youki is an implementation of the [OCI runtime-spec](https://github.com/opencontainers/runtime-spec) in Rust, similar to [runc](https://github.com/opencontainers/runc). Your ideas are welcome [here](https://github.com/containers/youki/issues/10). +# Quick Install + +[User Documentation](https://containers.github.io/youki/user/basic_setup.html#quick-install) + # About the name youki is pronounced as /joʊki/ or yoh-key. @@ -97,7 +101,6 @@ Here is why we are writing a new container runtime in Rust. -- The development of [railcar](https://github.com/oracle/railcar) has been suspended. This project was very nice but is no longer being developed. This project is inspired by it. - I have fun implementing this. In fact, this may be the most important. # Related project diff --git a/docs/src/user/basic_setup.md b/docs/src/user/basic_setup.md index 5860da84..d89fe097 100644 --- a/docs/src/user/basic_setup.md +++ b/docs/src/user/basic_setup.md @@ -6,7 +6,7 @@ Youki currently only supports Linux Platform, and to use it on other platform yo Also note that Youki currently only supports and expects systemd as init system, and would not work on other systems. There is currently work on-going to put systemd dependent features behind a feature flag, but till then you will need a systemd enabled system to work with Youki. -### Requirements +## Requirements As Youki is written in Rust, you will need to install and setup Rust toolchain to compile it. The instructions for that can be found on Rust's official site [here](https://www.rust-lang.org/tools/install). @@ -14,7 +14,7 @@ You can use Youki by itself to start and run containers, but it can be a little To compile and run, Youki itself depends on some underlying libraries being installed. You can install them using your respective package manager as shown below. -#### Debian, Ubuntu and related distributions +### Debian, Ubuntu and related distributions ```console $ sudo apt-get install \ @@ -28,7 +28,7 @@ $ sudo apt-get install \ libssl-dev ``` -#### Fedora, CentOS, RHEL and related distributions +### Fedora, CentOS, RHEL and related distributions ```console $ sudo dnf install \ @@ -43,34 +43,47 @@ $ sudo dnf install \ --- -### Getting the source +## Quick install + +Install from the GitHub release. +Note that this way also requires the aforementioned installation. + +```console +$ wget https://github.com/containers/youki/releases/download/v0.1.0/youki_0_1_0_linux.tar.gz +$ tar -zxvf youki_0_1_0_linux.tar.gz youki_0_1_0_linux/youki-0.1.0/youki +# Maybe you need root privileges. +$ mv youki_0_1_0_linux/youki-0.1.0/youki /usr/local/bin/youki +$ rm -rf youki_0_1_0_linux.tar.gz youki_0_1_0_linux +``` + +## Getting the source Currently Youki can only be installed from the source code itself, so you will need to clone the Youki GitHub repository to get the source code for using it as a runtime. If you are using any crates of Youki as dependency you need to do this step, as Cargo will automatically clone the repository for you. To clone the repository, run ```console -git clone https://github.com/containers/youki.git +$ git clone https://github.com/containers/youki.git ``` This will create a directory named youki in the directory you ran the command in. This youki directory will be referred to as root directory throughout the documentation. -### Installing the source +## Installing the source Once you have cloned the source, you can build it using ```console # go into the cloned directory -cd youki -make youki-dev # or youki-release -./youki -h # get information about youki command +$ cd youki +$ make youki-dev # or youki-release +$ ./youki -h # get information about youki command ``` This will build the Youki binary, and put it at the root level of the cloned directory, that is in the youki/ . --- -### Using sub-crates as dependency +## Using sub-crates as dependency To use any of the sub-crate as a dependency in your own project, you can specify the dependency as follows, @@ -91,7 +104,7 @@ use liboci_cli::{...} --- -### Using Vagrant to run Youki on non-Linux Platform +## Using Vagrant to run Youki on non-Linux Platform As explained before, Youki only support Linux, and to build/use it on non-Linux Platforms, you will need to use some kind of virtualization. The repo provides a Vagrantfile to do the required VM setup using Vagrant, which can be installed from [here](https://www.vagrantup.com/docs/installation). @@ -101,12 +114,12 @@ Once installed and setup, you can run vagrant commands in the cloned directory t # in the youki directory # for rootless mode, which is default -vagrant up -vagrant ssh +$ vagrant up +$ vagrant ssh # or if you want to develop in rootful mode -VAGRANT_VAGRANTFILE=Vagrantfile.root vagrant up -VAGRANT_VAGRANTFILE=Vagrantfile.root vagrant ssh +$ VAGRANT_VAGRANTFILE=Vagrantfile.root vagrant up +$ VAGRANT_VAGRANTFILE=Vagrantfile.root vagrant ssh # in virtual machine $ cd youki