Skip to content

Commit

Permalink
Merge pull request #1844 from dbungert/merge-discourse-2023-10-18
Browse files Browse the repository at this point in the history
Merge discourse 2023 10 18
  • Loading branch information
rkratky authored Oct 24, 2023
2 parents 9a4e25a + 9c6c616 commit 5b498f0
Show file tree
Hide file tree
Showing 6 changed files with 167 additions and 125 deletions.
2 changes: 1 addition & 1 deletion doc/howto/autoinstall-quickstart-s390x.rst
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ The encrypted password is ``ubuntu``.
Serve the cloud-init configuration over HTTP
============================================

Leave this running in one terminal window:
Leave this running in a new terminal window:

.. code-block:: none
Expand Down
36 changes: 20 additions & 16 deletions doc/reference/autoinstall-reference.rst
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ locale

* **type:** string
* **default:** ``en_US.UTF-8``
* **can be interactive:** yes
* **can be interactive:** true

The locale to configure for the installed system.

Expand All @@ -107,7 +107,7 @@ refresh-installer

* **type:** mapping
* **default:** see below
* **can be interactive:** yes
* **can be interactive:** true

Controls whether the installer updates to a new version available in the given
channel before continuing.
Expand Down Expand Up @@ -137,7 +137,7 @@ keyboard

* **type:** mapping, see below
* **default:** US English keyboard
* **can be interactive:** yes
* **can be interactive:** true

The layout of any attached keyboard. Often systems being automatically
installed will not have a keyboard at all in which case the value used here
Expand Down Expand Up @@ -189,17 +189,21 @@ source

* **type:** mapping, see below
* **default:** see below
* **can be interactive:** yes
* **can be interactive:** true

search_drivers
~~~~~~~~~~~~~~

* **type:** boolean
* **default:** ``true``
* **default:** ``true`` (mostly, see below)

Whether the installer should search for available third-party drivers. When
set to ``false``, it disables the drivers :ref:`screen and section<ai-drivers>`.

The default is true for most installs but false when a "core boot" or
"enhanced secure boot" method is selected (where third-party drivers
cannot currently be installed).

id
~~

Expand All @@ -215,9 +219,9 @@ network

* **type:** Netplan-format mapping, see below
* **default:** DHCP on interfaces named ``eth*`` or ``en*``
* **can be interactive:** yes
* **can be interactive:** true

`Netplan-formatted <https://netplan.io/reference>`_ network configuration.
`Netplan-formatted <https://netplan.readthedocs.io/en/stable/netplan-yaml/>`_ network configuration.
This will be applied during installation as well as in the installed system.
The default is to interpret the configuration for the installation media, which runs
DHCP version 4 on any interface with a name matching ``eth*`` or ``en*`` but then
Expand Down Expand Up @@ -255,7 +259,7 @@ proxy

* **type:** URL or ``null``
* **default:** no proxy
* **can be interactive:** yes
* **can be interactive:** true

The proxy to configure both during installation and for ``apt`` and for
``snapd`` in the target system.
Expand All @@ -267,7 +271,7 @@ apt

* **type:** mapping
* **default:** see below
* **can be interactive:** yes
* **can be interactive:** true

APT configuration, used both during the installation and once booted into the target
system.
Expand Down Expand Up @@ -384,7 +388,7 @@ storage
* **type:** mapping, see below
* **default:** use the ``lvm`` layout on single-disk systems; there is no default for
multiple-disk systems
* **can be interactive:** yes
* **can be interactive:** true

Storage configuration is a complex topic and the description of the desired
configuration in the autoinstall file can also be complex. The installer
Expand Down Expand Up @@ -604,7 +608,7 @@ identity

* **type:** mapping, see below
* **default:** no default
* **can be interactive:** yes
* **can be interactive:** true

Configure the initial user for the system. This is the only configuration key that
must be present (unless the :ref:`user-data section <ai-user-data>` is present,
Expand Down Expand Up @@ -657,7 +661,7 @@ active-directory

* **type:** mapping, see below
* **default:** no default
* **can be interactive:** yes
* **can be interactive:** true

Accepts data required to join the target system in an Active Directory domain.

Expand All @@ -681,7 +685,7 @@ ubuntu-pro

* **type:** mapping, see below
* **default:** see below
* **can be interactive:** yes
* **can be interactive:** true

token
~~~~~
Expand All @@ -698,7 +702,7 @@ ssh

* **type:** mapping, see below
* **default:** see below
* **can be interactive:** yes
* **can be interactive:** true

Configure SSH for the installed system. A mapping that can contain keys:

Expand Down Expand Up @@ -751,7 +755,7 @@ drivers

* **type:** mapping, see below
* **default:** see below
* **can be interactive:** yes
* **can be interactive:** true

install
~~~~~~~
Expand Down Expand Up @@ -787,7 +791,7 @@ snaps

* **type:** list
* **default:** install no extra snaps
* **can be interactive:** yes
* **can be interactive:** true

A list of snaps to install. Each snap is represented as a mapping with required
``name`` and optional ``channel`` (defaulting to ``stable``) and classic
Expand Down
73 changes: 46 additions & 27 deletions documentation/autoinstall-quickstart-s390x.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
# Autoinstall Quick Start for s390x

The intent of this page is to provide simple instructions to perform an autoinstall in a VM on your machine on s390x.

Expand All @@ -9,18 +8,23 @@ This page is just a slightly adapted page of [the autoinstall quickstart page](a
At the time of writing (just after the kinetic release), the best place to go is here:
<https://cdimage.ubuntu.com/ubuntu/releases/22.10/release/>

<pre><code>wget https://cdimage.ubuntu.com/ubuntu/releases/22.10/release/ubuntu-22.10-live-server-s390x.iso -P ~/Downloads</code></pre>
```bash
wget https://cdimage.ubuntu.com/ubuntu/releases/22.10/release/ubuntu-22.10-live-server-s390x.iso -P ~/Downloads
```

## Mount the ISO

<pre><code>mkdir -p ~/iso
sudo mount -r ~/Downloads/ubuntu-22.10-live-server-s390x.iso ~/iso</code></pre>
```bash
mkdir -p ~/iso
sudo mount -r ~/Downloads/ubuntu-22.10-live-server-s390x.iso ~/iso
```

## Write your autoinstall config

This means creating cloud-init config as follows:
This means creating a cloud-init #cloud-config file as follows:

<pre><code>mkdir -p ~/www
```bash
mkdir -p ~/www
cd ~/www
cat > user-data << 'EOF'
#cloud-config
Expand All @@ -31,25 +35,30 @@ autoinstall:
password: "$6$exDY1mhS4KUYCE/2$zmn9ToZwTKLhCw.b4/b.ZRTIZM30JZ4QrOQ2aOXJ8yk96xpcCof0kxKwuX1kqLG/ygbJ1f8wxED22bTL4F46P0"
username: ubuntu
EOF
touch meta-data</code></pre>
touch meta-data
```

The crypted password is just "ubuntu".

## Serve the cloud-init config over http
## Serve the cloud-init config over HTTP

Leave this running in one terminal window:
Leave this running in a new terminal window:

<pre><code>cd ~/www
python3 -m http.server 3003</code></pre>
```bash
cd ~/www
python3 -m http.server 3003
```

## Create a target disk

Proceed with a second terminal window:

<pre><code>sudo apt install qemu-utils
...</code></pre>
```bash
sudo apt install qemu-utils
```

<pre><code>qemu-img create -f qcow2 disk-image.qcow2 10G
```bash
qemu-img create -f qcow2 disk-image.qcow2 10G
Formatting 'disk-image.qcow2', fmt=qcow2 size=10737418240 cluster_size=65536 lazy_refcounts=off refcount_bits=16

qemu-img info disk-image.qcow2
Expand All @@ -62,30 +71,40 @@ Format specific information:
compat: 1.1
lazy refcounts: false
refcount bits: 16
corrupt: false</code></pre>
corrupt: false
```

## Run the install!

<pre><code>sudo apt install qemu-kvm
...</code></pre>
```bash
sudo apt install qemu-kvm
```

You may need to add the default user to the `kvm` group:

```bash
sudo usermod -a -G kvm ubuntu
```

You may need to add the default user to the kvm group: <<BR>>
`sudo usermod -a -G kvm ubuntu # re-login to make the changes take effect`
> **Note**:
> You will need to re-login to make the changes take effect.
<pre><code>kvm -no-reboot -name auto-inst-test -nographic -m 2048 \
```bash
kvm -no-reboot -name auto-inst-test -nographic -m 2048 \
-drive file=disk-image.qcow2,format=qcow2,cache=none,if=virtio \
-cdrom ~/Downloads/ubuntu-22.10-live-server-s390x.iso \
-kernel ~/iso/boot/kernel.ubuntu \
-initrd ~/iso/boot/initrd.ubuntu \
-append 'autoinstall ds=nocloud-net;s=http://_gateway:3003/ console=ttysclp0'</code></pre>
-append 'autoinstall ds=nocloud-net;s=http://_gateway:3003/ console=ttysclp0'
```

This will boot, download the config from the server set up in the previous step and run the install.
The installer reboots at the end but the -no-reboot flag to kvm means that kvm will exit when this happens.
It should take about 5 minutes.
This will boot, download the config from the server set up in the previous step and run the install. The installer reboots at the end but the `-no-reboot` flag to `kvm` means that `kvm` will exit when this happens. It should take about 5 minutes.

## Boot the installed system

<pre><code>kvm -no-reboot -name auto-inst-test -nographic -m 2048 \
-drive file=disk-image.qcow2,format=qcow2,cache=none,if=virtio</code></pre>
```bash
kvm -no-reboot -name auto-inst-test -nographic -m 2048 \
-drive file=disk-image.qcow2,format=qcow2,cache=none,if=virtio
```

This will boot into the freshly installed system and you should be able to log in as ubuntu/ubuntu.
This will boot into the freshly installed system and you should be able to log in as `ubuntu`/`ubuntu`.
Loading

0 comments on commit 5b498f0

Please sign in to comment.