Skip to content

Commit

Permalink
Add image registries into container config
Browse files Browse the repository at this point in the history
Fixes: clearlinux#67

Signed-off-by: Ganesh Maharaj Mahalingam <ganesh.mahalingam@intel.com>
  • Loading branch information
Ganesh Maharaj Mahalingam committed Mar 13, 2019
1 parent c2e932a commit 2882ea3
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
1 change: 1 addition & 0 deletions clr-k8s-examples/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ to ensure k8s works on it.
This script ensures the following

* Installs the bundles the Clearlinux needs to support Kubernetes, CRIO and Kata
* Setup `/etc/containers/registries.conf` to use docker.io & quay.io
* Customizes the system to ensure correct defaults are setup (IP Forwarding, Swap off,...)
* Ensures all the dependencies are loaded on boot (kernel modules)

Expand Down
8 changes: 8 additions & 0 deletions clr-k8s-examples/setup_system.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,14 @@ ADD_NO_PROXY+=",$(hostname -I | sed 's/[[:space:]]/,/g')"
sudo -E swupd update
sudo -E swupd bundle-add cloud-native-basic storage-utils

# Add registries for k8s onto crio's registries.conf
if [ ! -f /etc/containers/registries.conf ]; then
cat << EORF > sudo bash -c "cat > /etc/containers/registries.conf"
[registries.search]
registries = ['docker.io', 'quay.io']
EORF
fi

#Permanently disable swap
swapcount=$(sudo grep '^/dev/\([0-9a-z]*\).*' /proc/swaps | wc -l)

Expand Down

0 comments on commit 2882ea3

Please sign in to comment.