diff options
author | Yibo Cai <yibo.cai@arm.com> | 2018-01-18 11:12:45 +0800 |
---|---|---|
committer | Yibo Cai <yibo.cai@arm.com> | 2018-01-19 11:35:54 +0800 |
commit | e760737e8b065b54aaf743ead0fe6b86402645ef (patch) | |
tree | 12b63bb23bd32ddd17be35c7f4b270de175416a8 /compass-cobbler | |
parent | 8ec10f60d0fc9bfc43fcea57d6c809646bd4a48a (diff) |
compass-cobbler: support arm64
Differences from x86_64:
- User centos:7 as base image
- Don't install syslinux, install cobbler-grub-aarch64
- Replace default pxeprofile_arm.template
- Fixup cobbler to support arm64 deployment
Change-Id: I23e2d1b3c462420a9b76f27135e530e00db82d27
Signed-off-by: Yibo Cai <yibo.cai@arm.com>
Diffstat (limited to 'compass-cobbler')
-rw-r--r-- | compass-cobbler/Dockerfile-arm64 | 48 | ||||
-rw-r--r-- | compass-cobbler/distro_signatures.json | 8 | ||||
-rw-r--r-- | compass-cobbler/pxeprofile_arm.template | 6 |
3 files changed, 58 insertions, 4 deletions
diff --git a/compass-cobbler/Dockerfile-arm64 b/compass-cobbler/Dockerfile-arm64 new file mode 100644 index 0000000..10055f8 --- /dev/null +++ b/compass-cobbler/Dockerfile-arm64 @@ -0,0 +1,48 @@ +FROM centos:7 +ENV container docker +VOLUME [ "/sys/fs/cgroup" ] +ARG BRANCH=master + +# pkgs and services... +RUN yum -y update && \ + yum -y install epel-release && \ + yum -y install which wget dhcp bind pykickstart file initscripts net-tools tcpdump xinetd vim avahi avahi-tools ntp && \ + wget http://artifacts.opnfv.org/compass4nfv/package/cobbler/cobbler-2.6.10-1.fc22.noarch.rpm && \ + wget http://artifacts.opnfv.org/compass4nfv/package/cobbler/cobbler-web-2.6.10-1.fc22.noarch.rpm && \ + wget http://linux.enea.com/mos-repos/centos/mos8.0-centos7-fuel/armband/x86_64/Packages/cobbler-grub-aarch64-2.02~beta2-1.el7.36~mos1.noarch.rpm && \ + yum -y localinstall cobbler-2.6.10-1.fc22.noarch.rpm cobbler-web-2.6.10-1.fc22.noarch.rpm cobbler-grub-aarch64-2.02~beta2-1.el7.36~mos1.noarch.rpm && \ + rm -f cobbler-2.6.10-1.fc22.noarch.rpm cobbler-web-2.6.10-1.fc22.noarch.rpm cobbler-grub-aarch64-2.02~beta2-1.el7.36~mos1.noarch.rpm && \ + systemctl enable cobblerd && \ + systemctl enable httpd && \ + systemctl enable dhcpd && \ + systemctl enable xinetd && \ + systemctl enable ntpd + +# some tweaks on services +RUN sed -i -e 's/\(^.*disable.*=\) yes/\1 no/' /etc/xinetd.d/tftp && \ + touch /etc/xinetd.d/rsync + +RUN mkdir -p /var/www/cblr_ks + +COPY distro_signatures.json /var/lib/cobbler/distro_signatures.json +COPY start.sh /usr/local/bin/start.sh +RUN mv /etc/httpd/conf.d/cobbler_web.conf /etc/httpd/conf.d/cobbler_web.conf.bk +COPY cobbler_web.conf /etc/httpd/conf.d/cobbler_web.conf +RUN mv /etc/httpd/conf.d/cobbler.conf /etc/httpd/conf.d/cobbler.conf.bk +COPY cobbler.conf /etc/httpd/conf.d/cobbler.conf +RUN mkdir -p /var/www/pip-openstack + +COPY pxeprofile_arm.template /etc/cobbler/pxe/pxeprofile_arm.template +COPY pxeprofile_arm.template /etc/cobbler/pxe/pxesystem_arm.template +COPY pxeprofile_arm.template /etc/cobbler/pxe/grubsystem.template +COPY pxeprofile_arm.template /etc/cobbler/pxe/grubprofile.template +RUN touch /var/lib/cobbler/loaders/{pxelinux.0,menu.c32} && \ + sed -i 's/"\/pxelinux\.0"/"grub\/grub-aarch64\.efi"/' /usr/lib/python2.7/site-packages/cobbler/modules/manage_isc.py + +VOLUME ["/var/lib/cobbler", "/var/www/cobbler", "/etc/cobbler", "/mnt", "/var/www/cobbler/repo_mirror", "/var/www/pip"] +EXPOSE 67 +EXPOSE 69 +EXPOSE 80 +EXPOSE 443 +EXPOSE 25151 +CMD ["/sbin/init", "/usr/local/bin/start.sh"] diff --git a/compass-cobbler/distro_signatures.json b/compass-cobbler/distro_signatures.json index 71977b7..eaaea1a 100644 --- a/compass-cobbler/distro_signatures.json +++ b/compass-cobbler/distro_signatures.json @@ -89,7 +89,7 @@ "version_file_regex":null, "kernel_arch":"kernel-(.*).rpm", "kernel_arch_regex":null, - "supported_arches":["i386","x86_64","ppc","ppc64"], + "supported_arches":["i386","x86_64","ppc","ppc64","arm"], "supported_repo_breeds":["rsync", "rhn", "yum"], "kernel_file":"vmlinuz(.*)", "initrd_file":"initrd(.*)\\.img", @@ -283,7 +283,7 @@ "version_file_regex":"Codename: jessie", "kernel_arch":"linux-headers-(.*)\\.deb", "kernel_arch_regex":null, - "supported_arches":["i386","amd64"], + "supported_arches":["i386","amd64","arm"], "supported_repo_breeds":["apt"], "kernel_file":"vmlinuz(.*)", "initrd_file":"initrd(.*)\\.gz", @@ -299,7 +299,7 @@ "version_file_regex":"Codename: stretch", "kernel_arch":"linux-headers-(.*)\\.deb", "kernel_arch_regex":null, - "supported_arches":["i386","amd64"], + "supported_arches":["i386","amd64","arm"], "supported_repo_breeds":["apt"], "kernel_file":"vmlinuz(.*)", "initrd_file":"initrd(.*)\\.gz", @@ -461,7 +461,7 @@ "version_file_regex":"Codename: xenial|Ubuntu 16.04.3", "kernel_arch":"linux-headers-(.*)\\.deb", "kernel_arch_regex":null, - "supported_arches":["i386","amd64"], + "supported_arches":["i386","amd64","arm"], "supported_repo_breeds":["apt"], "kernel_file":"linux(.*)", "initrd_file":"initrd(.*)\\.gz", diff --git a/compass-cobbler/pxeprofile_arm.template b/compass-cobbler/pxeprofile_arm.template new file mode 100644 index 0000000..50d1cf9 --- /dev/null +++ b/compass-cobbler/pxeprofile_arm.template @@ -0,0 +1,6 @@ +set timeout=5 + +menuentry $profile_name { + linux (tftp)$kernel_path $append_line + initrd (tftp)$initrd_path +} |