Skip to content

Commit

Permalink
Merge pull request #4 from acend/philipona/first-iteration
Browse files Browse the repository at this point in the history
Feedback Lab 3
  • Loading branch information
phil-pona authored Sep 4, 2024
2 parents 8d4be62 + 0ee3193 commit 8cbb2c4
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 15 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -104,5 +104,5 @@ jobs:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
message: |
PR Environments:
* acend version <https://kubevirt-basics-training-pr-${{ github.event.pull_request.number }}.training.acend.ch>
* tim&koko version <https://kubevirt-basics-training-pr-${{ github.event.pull_request.number }}.training.tim-koko.ch>
* acend version <https://kubevirt-basics-pr-${{ github.event.pull_request.number }}.training.acend.ch>
* tim&koko version <https://kubevirt-basics-pr-${{ github.event.pull_request.number }}.training.tim-koko.ch>
2 changes: 1 addition & 1 deletion content/en/docs/02/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ description: >
* Start and Stop a VM using `virtctl` or `kubectl`
* Connect to the console of the VM
* Expose and access ports of your VM
* Making file changes to you VM and observe behaviour
* Changing a file inside of a VM and observe behaviour


## Folder structure
Expand Down
2 changes: 1 addition & 1 deletion content/en/docs/03/31_cdi-introduction.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ The operator has already been installed in the namespace `cdi`. If you want to d

You may see the cdi operator components with:
```shell
kubectl get pods -n cdi
kubectl get pods --namespace cdi
```

The output should similar to:
Expand Down
10 changes: 5 additions & 5 deletions content/en/docs/03/32_create-datavolume.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ We want to provision a VM running an Alpine Cloud Image[^1].

## {{% task %}} Write your own DataVolume manifest

Create a file `dv_{{% param "labsubfolderprefix" %}}{{% param "labfoldernumber" %}}-alpinedisk.yaml` and start with the
Create a file `dv_{{% param "labsubfolderprefix" %}}{{% param "labfoldernumber" %}}-alpinedisk.yaml` in the folder `{{% param "labsfoldername" %}}/{{% param "labsubfolderprefix" %}}{{% param "labfoldernumber" %}}`and start with the
yaml content from the previous section:

```yaml
Expand Down Expand Up @@ -70,7 +70,7 @@ spec:
Before you apply your DataVolume to the cluster check the currently available pvcs.

```shell
kubectl get pvc
kubectl get pvc --namespace=$USER
```

The output should be similar to:
Expand All @@ -82,7 +82,7 @@ $USER-webshell-docker Bound pvc-86e4bc75-396f-4630-940e-b0a4b0cf23fa 10Gi

Now create the DataVolume in the kubernetes cluster with:
```shell
kubectl create -f {{% param "labsubfolderprefix" %}}{{% param "labfoldernumber" %}}-alpinedisk.yaml
kubectl create -f {{% param "labsfoldername" %}}/{{% param "labsubfolderprefix" %}}{{% param "labfoldernumber" %}}/dv_{{% param "labsubfolderprefix" %}}{{% param "labfoldernumber" %}}-alpinedisk.yaml --namespace=$USER
```

The output should be:
Expand All @@ -92,7 +92,7 @@ datavolume.cdi.kubevirt.io/{{% param "labsubfolderprefix" %}}{{% param "labfolde

This will trigger the CDI operator which will start an importer pod to provision your pvc. If you are fast enough you may see the pod with:
```shell
kubectl get pods
kubectl get pods --namespace=$USER
```

The output should be similar to:
Expand All @@ -105,7 +105,7 @@ $USER-webshell-885dbc579-lwhtd 2/2 Running
After some time the pod will complete and your pvc should be provisioned. Let's check for the existence of the pvc.

```shell
kubectl get pvc
kubectl get pvc --namespace=$USER
```

The output should be similar to:
Expand Down
12 changes: 6 additions & 6 deletions content/en/docs/03/33_apline-vm.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ disk image.

## {{% task %}} Attach the disk

With your knowledge write a new VirtualMachine manifest named `{{% param "labsubfolderprefix" %}}{{% param "labfoldernumber" %}}-alpine.yaml`.
With your knowledge write a new VirtualMachine manifest named `{{% param "labsubfolderprefix" %}}{{% param "labfoldernumber" %}}-alpine.yaml` in the directory `{{% param "labsfoldername" %}}/{{% param "labsubfolderprefix" %}}{{% param "labfoldernumber" %}}`.

{{% alert title="Note" color="info" %}}
This Alpine Cloud Image has cloud-init included. We will need another disk (cloudinitdisk) which configures our environment.
Expand Down Expand Up @@ -83,20 +83,20 @@ spec:

Create the vm in the kubernetes cluster:
```shell
kubectl create -f {{% param "labsubfolderprefix" %}}{{% param "labfoldernumber" %}}-alpine.yaml
kubectl create -f {{% param "labsfoldername" %}}/{{% param "labsubfolderprefix" %}}{{% param "labfoldernumber" %}}/{{% param "labsubfolderprefix" %}}{{% param "labfoldernumber" %}}-alpine.yaml --namespace=$USER
```

Start your vm with:
```shell
virtctl start {{% param "labsubfolderprefix" %}}{{% param "labfoldernumber" %}}-alpine
virtctl start {{% param "labsubfolderprefix" %}}{{% param "labfoldernumber" %}}-alpine --namespace=$USER
```


## {{% task %}} Testing the VM

Open the console of your VM:
```shell
virtctl console {{% param "labsubfolderprefix" %}}{{% param "labfoldernumber" %}}-alpine
virtctl console {{% param "labsubfolderprefix" %}}{{% param "labfoldernumber" %}}-alpine --namespace=$USER
```

After some time your VM should be successfully be provisioned with the alpine cloud disk image.
Expand All @@ -109,11 +109,11 @@ You should be able to successfully login with user `alpine` and the configured p

Stop your running VM with
```shell
virtctl stop {{% param "labsubfolderprefix" %}}{{% param "labfoldernumber" %}}-alpine
virtctl stop {{% param "labsubfolderprefix" %}}{{% param "labfoldernumber" %}}-alpine --namespace=$USER
```

Delete your DataVolume which will delete the PVC and free the diskspace.
```shell
kubectl delete dv {{% param "labsubfolderprefix" %}}{{% param "labfoldernumber" %}}-alpinedisk
kubectl delete dv {{% param "labsubfolderprefix" %}}{{% param "labfoldernumber" %}}-alpinedisk --namespace=$USER
```
{{% /alert %}}

0 comments on commit 8cbb2c4

Please sign in to comment.