Skip to content

Instantly share code, notes, and snippets.

@shashidharatd
Last active March 6, 2020 11:02
Show Gist options
  • Save shashidharatd/7204befd04f1dc1184f3df3afffa8411 to your computer and use it in GitHub Desktop.
Save shashidharatd/7204befd04f1dc1184f3df3afffa8411 to your computer and use it in GitHub Desktop.
export GOPATH=~/go
export PATH=${GOPATH}/bin:/usr/local/go/bin:${PATH}
export KATA_DEV_MODE=true
export CRIO=no
export KUBERNETES=no
export OPENSHIFT=no
#golang
go version go1.12.3 linux/arm64
wget https://dl.google.com/go/go1.12.3.linux-arm64.tar.gz
tar -C /usr/local -xzf go1.12.3.linux-arm64.tar.gz
go get -d github.com/kata-containers/tests
cd $GOPATH/src/github.com/kata-containers/tests
.ci/setup.sh
docker build --build-arg KATA_ARTIFACTS=./kata-static-1.11.0-alpha0-aarch64.tar.xz --build-arg KUBE_ARCH=arm64 -t katadocker/kata-deploy:1.11.0-alpha0-arm64 ./kata-deploy
root@nrt1-c1:~/go/src/github.com/kata-containers/packaging# git diff
diff --git a/kata-deploy/Dockerfile b/kata-deploy/Dockerfile
index 5db3a0b..9cff27b 100644
--- a/kata-deploy/Dockerfile
+++ b/kata-deploy/Dockerfile
@@ -1,13 +1,28 @@
-FROM centos/systemd
+FROM centos:7
+
+ENV container docker
+MAINTAINER The CentOS Project <[email protected]>
+
+RUN (cd /lib/systemd/system/sysinit.target.wants/; for i in *; do [ $i == systemd-tmpfiles-setup.service ] || rm -f $i; done); \
+rm -f /lib/systemd/system/multi-user.target.wants/*;\
+rm -f /etc/systemd/system/*.wants/*;\
+rm -f /lib/systemd/system/local-fs.target.wants/*; \
+rm -f /lib/systemd/system/sockets.target.wants/*udev*; \
+rm -f /lib/systemd/system/sockets.target.wants/*initctl*; \
+rm -f /lib/systemd/system/basic.target.wants/*;\
+rm -f /lib/systemd/system/anaconda.target.wants/*;
+
+VOLUME [ "/sys/fs/cgroup" ]
+
+CMD ["/usr/sbin/init"]
+
ARG KUBE_ARCH=amd64
ARG KATA_ARTIFACTS=./kata-static.tar.xz
ARG DESTINATION=/opt/kata-artifacts
COPY ${KATA_ARTIFACTS} .
-RUN \
-yum install -y epel-release && \
-yum install -y bzip2 jq && \
+RUN yum install -y epel-release && yum install -y bzip2 jq && \
mkdir -p ${DESTINATION} && \
tar xvf ${KATA_ARTIFACTS} -C ${DESTINATION}/ && \
chown -R root:root ${DESTINATION}/
diff --git a/release/kata-deploy-binaries.sh b/release/kata-deploy-binaries.sh
index 00b67d7..657b564 100755
--- a/release/kata-deploy-binaries.sh
+++ b/release/kata-deploy-binaries.sh
@@ -218,7 +218,7 @@ install_kata_components() {
popd >>/dev/null
done
sed -i -e '/^initrd =/d' "${destdir}/${prefix}/share/defaults/${project}/configuration-qemu.toml"
- sed -i -e '/^initrd =/d' "${destdir}/${prefix}/share/defaults/${project}/configuration-fc.toml"
+ #sed -i -e '/^initrd =/d' "${destdir}/${prefix}/share/defaults/${project}/configuration-fc.toml"
pushd "${destdir}/${prefix}/share/defaults/${project}"
ln -sf "configuration-qemu.toml" configuration.toml
popd
@@ -257,8 +257,8 @@ EOT
untar_qemu_binaries() {
info "Install static qemu"
tar xf kata-static-qemu.tar.gz -C "${destdir}"
- info "Install static qemu-virtiofs"
- tar xf kata-static-qemu-virtiofsd.tar.gz -C "${destdir}"
+ #info "Install static qemu-virtiofs"
+ #tar xf kata-static-qemu-virtiofsd.tar.gz -C "${destdir}"
}
main() {
@@ -285,12 +285,12 @@ main() {
mkdir -p "${destdir}"
install_image
install_kata_components
- install_experimental_kernel
+ #install_experimental_kernel
install_kernel
- install_clh
+ #install_clh
install_qemu
- install_qemu_virtiofsd
- install_firecracker
+ #install_qemu_virtiofsd
+ #install_firecracker
install_docker_config_script
untar_qemu_binaries
diff --git a/static-build/qemu/Dockerfile b/static-build/qemu/Dockerfile
index 76c26e0..6c44d7f 100644
--- a/static-build/qemu/Dockerfile
+++ b/static-build/qemu/Dockerfile
@@ -26,7 +26,7 @@ RUN apt-get install -y \
libglib2.0-dev git \
libltdl-dev \
libpixman-1-dev \
- libpmem-dev \
+ #libpmem-dev \
libtool \
pkg-config \
pkg-config \
root@nrt1-c1:~/go/src/github.com/kata-containers/packaging#
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment