mirror of
https://github.com/containers/podman.git
synced 2025-07-15 03:02:52 +08:00
Update cni config instructions
Update the CNI configuration instructions to line up with the changes introduced in #3868. Also do a bit less documentation of the configuration and point to the GitHub project so we won't get out of sync in the future. Signed-off-by: TomSweeneyRedHat <tsweeney@redhat.com>
This commit is contained in:
@ -1,15 +1,17 @@
|
|||||||
## `cni` ##
|
## `cni` ##
|
||||||
|
|
||||||
There are a wide variety of different [CNI][cni] network configurations. This
|
There are a wide variety of different [CNI](https://github.com/containernetworking/cni) network configurations. This
|
||||||
directory just contains an example configuration that can be used as the
|
directory just contains an example configuration that can be used as the
|
||||||
basis for your own configuration.
|
basis for your own configuration.
|
||||||
|
|
||||||
To use this configuration, place it in `/etc/cni/net.d` (or the directory
|
To use this configuration, place it in `/etc/cni/net.d` (or the directory
|
||||||
specified by `cni_config_dir` in your `libpod.conf`).
|
specified by `cni_config_dir` in your `libpod.conf`).
|
||||||
|
|
||||||
In addition, you need to install the [CNI plugins][cni] necessary into
|
For example a basic network configuration can be achieved with:
|
||||||
`/opt/cni/bin` (or the directory specified by `cni_plugin_dir`). The
|
|
||||||
two plugins necessary for the example CNI configurations are `portmap` and
|
|
||||||
`bridge`.
|
|
||||||
|
|
||||||
[cni]: https://github.com/containernetworking/plugins
|
```bash
|
||||||
|
sudo mkdir -p /etc/cni/net.d
|
||||||
|
curl -qsSL https://raw.githubusercontent.com/containers/libpod/master/cni/87-podman-bridge.conflist | sudo tee /etc/cni/net.d/87-podman-bridge.conf
|
||||||
|
```
|
||||||
|
|
||||||
|
Dependent upon your CNI configuration, you will need to install as a minimum the `port` and `bridge` [CNI plugins](https://github.com/containernetworking/plugins) into `/opt/cni/bin` (or the directory specified by `cni_plugin_dir` in libpod.conf). Please refer to the [CNI](https://github.com/containernetworking) project page in GitHub for more information.
|
||||||
|
29
install.md
29
install.md
@ -190,11 +190,14 @@ To build, use the following (running `make` can take a while):
|
|||||||
git clone https://github.com/ostreedev/ostree ~/ostree
|
git clone https://github.com/ostreedev/ostree ~/ostree
|
||||||
cd ~/ostree
|
cd ~/ostree
|
||||||
git submodule update --init
|
git submodule update --init
|
||||||
# for Fedora, CentOS, RHEL
|
|
||||||
sudo yum install -y automake bison e2fsprogs-devel fuse-devel libtool xz-devel zlib-devel
|
|
||||||
# for Debian, Ubuntu etc.
|
|
||||||
sudo apt-get install -y automake bison e2fsprogs e2fslibs-dev fuse libfuse-dev libgpgme-dev liblzma-dev libtool zlib1g
|
|
||||||
|
|
||||||
|
# for Fedora, CentOS, RHEL
|
||||||
|
sudo yum install -y automake bison e2fsprogs-devel fuse-devel gpgme-devel libseccomp-devel libtool systemd-devel xz-devel zlib-devel
|
||||||
|
|
||||||
|
# for Debian, Ubuntu etc.
|
||||||
|
sudo apt-get install -y automake bison e2fsprogs e2fslibs-dev fuse libfuse-dev libgpgme-dev liblzma-dev libseccomp-dev libsystemd-dev libtool zlib1g
|
||||||
|
|
||||||
|
# for all distributions
|
||||||
./autogen.sh --prefix=/usr --libdir=/usr/lib64 --sysconfdir=/etc
|
./autogen.sh --prefix=/usr --libdir=/usr/lib64 --sysconfdir=/etc
|
||||||
# remove --nonet option due to https:/github.com/ostreedev/ostree/issues/1374
|
# remove --nonet option due to https:/github.com/ostreedev/ostree/issues/1374
|
||||||
sed -i '/.*--nonet.*/d' ./Makefile-man.am
|
sed -i '/.*--nonet.*/d' ./Makefile-man.am
|
||||||
@ -226,6 +229,7 @@ To build from source, use the following:
|
|||||||
```bash
|
```bash
|
||||||
git clone https://github.com/containers/conmon
|
git clone https://github.com/containers/conmon
|
||||||
cd conmon
|
cd conmon
|
||||||
|
export GOCACHE="$(mktemp -d)"
|
||||||
make
|
make
|
||||||
sudo make podman
|
sudo make podman
|
||||||
```
|
```
|
||||||
@ -245,25 +249,12 @@ sudo cp runc /usr/bin/runc
|
|||||||
|
|
||||||
#### CNI plugins
|
#### CNI plugins
|
||||||
|
|
||||||
```bash
|
|
||||||
git clone https://github.com/containernetworking/plugins.git $GOPATH/src/github.com/containernetworking/plugins
|
|
||||||
cd $GOPATH/src/github.com/containernetworking/plugins
|
|
||||||
./build_linux.sh
|
|
||||||
sudo mkdir -p /usr/libexec/cni
|
|
||||||
sudo cp bin/* /usr/libexec/cni
|
|
||||||
```
|
|
||||||
|
|
||||||
#### Setup CNI networking
|
#### Setup CNI networking
|
||||||
|
|
||||||
A proper description of setting up CNI networking is given in the [`cni` README](cni/README.md).
|
A proper description of setting up CNI networking is given in the [`cni` README](cni/README.md).
|
||||||
|
|
||||||
Using the CNI plugins from above, a more basic network config is achieved with:
|
A basic setup for CNI networking is done by default during the installation or make processes and
|
||||||
|
no further configuration is needed to start using Podman.
|
||||||
```bash
|
|
||||||
sudo mkdir -p /etc/cni/net.d
|
|
||||||
curl -qsSL https://raw.githubusercontent.com/containers/libpod/master/cni/87-podman-bridge.conflist | sudo tee /etc/cni/net.d/99-loopback.conf
|
|
||||||
```
|
|
||||||
|
|
||||||
|
|
||||||
#### Add configuration
|
#### Add configuration
|
||||||
|
|
||||||
|
@ -39,8 +39,9 @@ The following instructions assume your GOPATH is ~/go. Adjust as needed for your
|
|||||||
environment.
|
environment.
|
||||||
|
|
||||||
### Installing ginkgo
|
### Installing ginkgo
|
||||||
Build ginkgo and install it under $GOPATH/bin with the following command:
|
Build ginkgo and install it under $GOPATH/bin with the following commands:
|
||||||
```
|
```
|
||||||
|
export GOCACHE="$(mktemp -d)"
|
||||||
GOPATH=~/go make .install.ginkgo
|
GOPATH=~/go make .install.ginkgo
|
||||||
```
|
```
|
||||||
If your PATH does not include $GOPATH/bin, you might consider adding it.
|
If your PATH does not include $GOPATH/bin, you might consider adding it.
|
||||||
|
Reference in New Issue
Block a user