Skip to content

Latest commit

 

History

History
156 lines (105 loc) · 6.64 KB

INSTALLATION.md

File metadata and controls

156 lines (105 loc) · 6.64 KB

Quick-Start

Two quick-starts are provided, one for end-users, the other one for developers.

As an end user who wish to use Pouch, please read End User Quick-Start to install and explore Pouch.

As a developer who wish to hack on Pouch, please read Developer Quick-Start to start hacking and get invloved in the project!

End User Quick-Start

You can install Pouch automatically on your machine with very few steps. Currently we support two kinds of Linux Distribution: Ubuntu and CentOS.

Ubuntu

To be added.

CentOS

To install Pouch, you need a maintained version of CentOS 7 Archived versions aren’t supported or tested.

We have put rpm package to Aliyun mirrors, you can install pouch using Pouch repository. If you install Pouch for the first on a new host machine, you need to set up the Pouch repository. Then, you can install and update Pouch from repository.

1.Install yum-utils

Install required packages. yum-utils provides the yum-config-manager utility.

sudo yum install -y yum-utils

2. Set up the pouch repository

Use the following command to add Pouch repository.

sudo yum-config-manager \
    --add-repo \
    http://mirrors.aliyun.com/opsx/opsx-centos7.repo
sudo yum update

3. Install pouch

Run the following command to install the latest version of Pouch. If it's the first time to install Pouch on your host, you will be prompted to accept the GPG key, and the key's fingerprint will be shown.

sudo yum install pouch 

After installing Pouch, the pouch group is created, but no users are added to the group.

4. Start pouch

sudo systemctl start pouch

Afterwards, you can pull an image and run Pouch containers.

5. Uninstall pouch

sudo yum remove pouch

After running the remove command, images, containers, volumes, or customized configuration files on your host are not automatically removed. To delete all images, containers and volumes, execute the following command:

sudo rm -rf /var/lib/pouch

Developer Quick-Start

This guide provides step by step instructions to deploy Pouch on bare metal servers or virtual machines. As a developer, you may need to build and test Pouch binaries via source code. To build pouchd which is so-called "pouch daemon" and pouch which is so-called "pouch cli", the following build system dependencies are required:

  • Linux Kernel 3.10+
  • Go 1.9.0+
  • containerd: 1.0.0
  • runc: 1.0.0-rc4
  • runv: 1.0.0 (option)

Prerequisites Installation

Since pouchd is a kind of container engine, and pouch is a cli tool, if you hope to experience container management ability via Pouch, there are several additional binaries needed:

  • containerd: an industry-standard container runtime;
  • runc: a CLI tool for spawning and running containers according to the OCI specification;
  • runv: a hypervisor-based runtime for OCI.

Here are the shell scripts to install containerd and runc:

# install containerd
$ wget https://github.com/containerd/containerd/releases/download/v1.0.0/containerd-1.0.0.linux-amd64.tar.gz
$ tar -xzvf containerd-1.0.0.linux-amd64.tar.gz -C /usr/local
$
# install runc
$ wget https://github.com/opencontainers/runc/releases/download/v1.0.0-rc4/runc.amd64 -P /usr/local/bin 
$ chmod +x /usr/local/bin/runc.amd64
$ mv /usr/local/bin/runc.amd64 /usr/local/bin/runc

runV Installation

If you wish to experience hypervisor-based virtualization additionally, you will still need to install runV.

More guide on experiencing Pouch with runV including runv Installation, please refer to pouch run with runv guide.

Pouch Build and Installation

With all prerequisites installed, you can build and install pouch daemon and pouch cli. Clone the repository and checkout whichever branch you like (in the following example, checkout branch master):

$ mkdir -p $GOPATH/src/github.com/alibaba/ 
$ cd $GOPATH/src/github.com/alibaba/; git clone https://github.com/alibaba/pouch.git
$ cd pouch; git checkout master

Makefile target named build will compile the pouch and pouchd binaries in current work directory. Or you can just execute make install to build binaries and install them in destination directory (/usr/local/bin by default).

$ make install

Start Pouch

With all needed binaries installed, you could start pouchd via:

$ pouchd
INFO[0000] starting containerd                           module=containerd revision=a543c937eb0a05e1636714ee2be70819d745b960 version=v1.0.0-beta.2
INFO[0000] setting subreaper...                          module=containerd
INFO[0000] loading plugin "io.containerd.content.v1.content"...  module=containerd type=io.containerd.content.v1
INFO[0000] loading plugin "io.containerd.snapshotter.v1.btrfs"...  module=containerd type=io.containerd.snapshotter.v1
WARN[0000] failed to load plugin io.containerd.snapshotter.v1.btrfs  error="path /var/lib/containerd/io.containerd.snapshotter.v1.btrfs must be a btrfs filesystem to be used with the btrfs snapshotter" module=containerd
INFO[0000] loading plugin "io.containerd.snapshotter.v1.overlayfs"...  module=containerd type=io.containerd.snapshotter.v1
INFO[0000] loading plugin "io.containerd.metadata.v1.bolt"...  module=containerd type=io.containerd.metadata.v1
WARN[0000] could not use snapshotter btrfs in metadata plugin  error="path /var/lib/containerd/io.containerd.snapshotter.v1.btrfs must be a btrfs filesystem to be used with the btrfs snapshotter" module="containerd/io.containerd.metadata.v1.bolt"
INFO[0000] loading plugin "io.containerd.differ.v1.walking"...  module=containerd type=io.containerd.differ.v1
INFO[0000] loading plugin "io.containerd.grpc.v1.containers"...  module=containerd type=io.containerd.grpc.v1

After pouchd's running, you could interact with pouchd by pouch cli:

$ pouch images
IMAGE ID             IMAGE NAME                                               SIZE
3e8fa85ddfef         docker.io/library/busybox:latest                         2699
504cf109b492         docker.io/library/redis:alpine                           2035

Feedback

We hope this guide would help you get up and run with Pouch. And feel free to send feedback via ISSUE, if you have any questions. If you wish to contribute to Pouch on this guide, please just submit a pull request.