diff options
author | Pasha <pasha@member.fsf.org> | 2022-08-24 23:52:13 +0000 |
---|---|---|
committer | Pasha <pasha@member.fsf.org> | 2022-08-24 23:52:13 +0000 |
commit | 318d25eb077b4659c6bd2f93283f18d0451aec95 (patch) | |
tree | 67ab3712c3f40a06f1a6ac45eb3301d0cfe0d935 | |
parent | 62b5f3aad043d50f29db7a7dc53b1d9eb7393c8e (diff) | |
download | hurd_openstack-318d25eb077b4659c6bd2f93283f18d0451aec95.tar.gz hurd_openstack-318d25eb077b4659c6bd2f93283f18d0451aec95.tar.bz2 |
update readme and cloud_native
-rw-r--r-- | README | 52 | ||||
-rw-r--r-- | cloud_native | 79 |
2 files changed, 97 insertions, 34 deletions
@@ -17,9 +17,9 @@ GNU Hurd on OpenStack ---------------------- -1. Install GNU Hurd and save as qcow2 format. -2. create user account "debian". (openstack will try to push selected ssh key based login for this account.) -3. workaround: currnet GNU Hurd in openstack could not read login metadata. Therefore, create another account name hurdstack. We will use this account to login via ssh. +Install GNU Hurd in Qemu and save as qcow2 format. + +Traditional way (check cloud_native file for more information) ------------------- set console output @@ -31,26 +31,18 @@ set console output ------------------ install packages ------------------ -# apt-get install patch cloud-init inetutils-tools - ------------------------------------------------ -patch cloud-init for inetutils-ifconfig support ------------------------------------------------ -# patch /usr/lib/python3/dist-packages/cloudinit/netinfo.py < netinfo.py.patch +# apt-get install inetutils-tools -(md5sum /usr/lib/python3/dist-packages/cloudinit/netinfo.py and set the value - optional) +-------- +turn off +-------- +# /sbin/shutdown -h now -# sed -i "s/004c853827df095227eef86175ee351b usr\/lib\/python3\/dist-packages\/cloudinit\/netinfo.py/79af408603bc6e3489fd2d3f1a0e9cac usr\/lib\/python3\/dist-packages\/cloudinit\/netinfo.py/" /var/lib/dpkg/info/cloud-init.md5sums -------------------------------- -remove MAC address and clean up -------------------------------- -# virt-sysprep -d hurdstack -# virsh undefine hurdstack +------------------------------------------------------ +upload your image using openstack cli or web-interface +------------------------------------------------------ --------------------------------------------------------------- -upload in openstack (you may change --public to other settings) --------------------------------------------------------------- $ openstack image create \ --container-format bare \ --disk-format qcow2 \ @@ -60,20 +52,15 @@ $ openstack image create \ --property os_admin_user=debian \ --property os_version='10.12.7' \ --property hw_vif_model=e1000 \ - --public \ + --private \ --file hurdstack.qcow2 \ hurdstack ------------------------------- -example create server command ------------------------------- -list your available net-id -$ openstack network list +If you use web-interface please set the properties using edit button beside the image. -list your available security group id -$ openstack security group list - -start an instance with any flavor (example with m1.nano) +--------------------------------------------------------------------------------------------- +start an instance with any flavor (example with m1.nano) using command line or web-interface. +--------------------------------------------------------------------------------------------- $ openstack server create \ --flavor m1.nano \ --image hurdstack \ @@ -88,9 +75,6 @@ check server status enable port 22 from web-interface or command line for ssh login. -You may check status in openstack web-interface logs and ssh when it is ready. -ssh might take several minutes as cloud-init is trying to fetch metadata on boot which is still unavailable from GNU Hurd. +Now, you can ssh to your server. + -links: -https://www.debian.org/ports/hurd/hurd-install -https://docs.openstack.org/image-guide/create-images-manually.html diff --git a/cloud_native b/cloud_native new file mode 100644 index 0000000..964a6aa --- /dev/null +++ b/cloud_native @@ -0,0 +1,79 @@ + +Cloud native way (currently not working fully as iproute2 package is missing) + +1. create user account "debian". (openstack will try to push selected ssh key based login for this account.) +2. workaround: currnet GNU Hurd in openstack could not read login metadata. Therefore, create another account name hurdstack. We will use this account to login via ssh. + +------------------- +set console output +------------------- +# sed -i 's/{GRUB_CMDLINE_GNUMACH}/{GRUB_CMDLINE_GNUMACH} console=com0/' /etc/grub.d/10_hurd +# export PATH=$PATH:/usr/sbin/:/sbin/ +# update-grub + +------------------ +install packages +------------------ +# apt-get install patch cloud-init inetutils-tools + +----------------------------------------------- +patch cloud-init for inetutils-ifconfig support +----------------------------------------------- +# patch /usr/lib/python3/dist-packages/cloudinit/netinfo.py < netinfo.py.patch + +(md5sum /usr/lib/python3/dist-packages/cloudinit/netinfo.py and set the value - optional) + +# sed -i "s/004c853827df095227eef86175ee351b usr\/lib\/python3\/dist-packages\/cloudinit\/netinfo.py/79af408603bc6e3489fd2d3f1a0e9cac usr\/lib\/python3\/dist-packages\/cloudinit\/netinfo.py/" /var/lib/dpkg/info/cloud-init.md5sums + +------------------------------- +remove MAC address and clean up +------------------------------- +# virt-sysprep -d hurdstack +# virsh undefine hurdstack + +-------------------------------------------------------------- +upload in openstack (you may change --public to other settings) +-------------------------------------------------------------- +$ openstack image create \ + --container-format bare \ + --disk-format qcow2 \ + --property hw_disk_bus=ide \ + --property os_type=linux \ + --property os_distro=debian \ + --property os_admin_user=debian \ + --property os_version='10.12.7' \ + --property hw_vif_model=e1000 \ + --private \ + --file hurdstack.qcow2 \ + hurdstack + +------------------------------ +example create server command +------------------------------ +list your available net-id +$ openstack network list + +list your available security group id +$ openstack security group list + +start an instance with any flavor (example with m1.nano) +$ openstack server create \ + --flavor m1.nano \ + --image hurdstack \ + --nic net-id=44b3993a-60dd-4074-a911-1b9ac4b8b6fa \ + --security-group 8b5d5482-2686-40a8-b394-5c764b6fe310 \ + --key-name mykey hurdstackinstance + +-------------------- +check server status +-------------------- +# openstack server list + +enable port 22 from web-interface or command line for ssh login. + +You may check status in openstack web-interface logs and ssh when it is ready. +ssh might take several minutes as cloud-init is trying to fetch metadata on boot which is still unavailable from GNU Hurd. + +links: +https://www.debian.org/ports/hurd/hurd-install +https://docs.openstack.org/image-guide/create-images-manually.html |