Skip to content

Commit

Permalink
removed autoinstall folder
Browse files Browse the repository at this point in the history
  • Loading branch information
belajarpowershell committed Feb 8, 2024
1 parent 752bc41 commit 471573c
Show file tree
Hide file tree
Showing 10 changed files with 90 additions and 509 deletions.
File renamed without changes.
78 changes: 78 additions & 0 deletions k3s-lab-setup/100-alpine1/113-generate-user-data-multipleVM.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@


## Generate `user-data-mac-address` file.

Step `103-setup-using-ansible` would have setup `alpine1` to perform the functions required for the Ubuntu Auto install steps.

We now have some manual tasks to create the `user-data-mac-address` file for each of the Virtual Machines created ( excluding `alpine1`)



### Step 1

#### Start and stop all the Virtual Machines created.

For the following step, the Virtual Machines created must be started once to generate the mac-address.

From PowerShell ISE open `G:\kubernetes-lab\srv\scripts\hyper-v_Host\get-hyperv-start-stopVM.ps1`

Click on the `Green Play` button, this will execute the script.

This will start and then stop all the Virtual Machines ( Load⁎ , master⁎ , worker⁎ , ⁎single⁎ ). Ensure the Virtual Machine names are not changed.

You can also Start and Stop from the Hyper-V Console.



### Step 2

#### Generate user-data-mac-address file.

For a Kubernetes cluster we will need multiple Virtual Machines. This will require multiple `user-data-mac-address` files to be created. Here I use PowerShell to generate the files.

From PowerShell ISE open `G:\kubernetes-lab\srv\scripts\hyper-v_Host\get-hyperv-VM-mac.ps1`

Click on the `Green Play` button, this will execute the script.

The generated files are in the subfolder `.\autoinstall\`

![114-01-location-of-script](./../screenshots\114-01-location-of-script.png)



From the configuration in step 112 ( refer to manual step 112) , the Boot sequence is looking up the location. `http://192.168.100.1/autoinstall/`

This is from the following code

```
APPEND netboot=nfs boot=casper root=/dev/nfs nfsroot=192.168.100.1:/srv/isoubuntu autoinstall
```

Copy the files created to the folder

` /srv/autoinstall/` on the `alpine1` server. The duplicate file with the node name is workaround to show the hostname of the specific file. As I did not find away to identify the hostname using the Ubuntu autoinstall method.



![114-02-wsftp-cp-autoinstall](./../screenshots\114-02-wsftp-cp-autoinstall.png)



If you recall from 104-setup-nginx, the folder /srv/ was exposed to be visible from `http://192.168.100.1/`. All folders created in `/srv/` will be listed via the browser.

Copy the files using WSFTP or some other method .

Validate by browsing `http://192.168.100.1/`



![114-03-list-autoinstall-in-browser](./../../screenshots\114-03-list-autoinstall-in-browser.png)

// To update Video of Script generation and the Ubuntu setup.



#### Lessons Learnt

The MAC addresses for a newly created Hyper-V VM is not generated until its started at least once.

Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,14 @@

## Generate `user-data-mac-address` file.

Step `103-setup-using-ansible` would have setup `alpine1` to perform the functions required for the Ubuntu Auto install steps.

We now have some manual tasks to create the `user-data-mac-address` file for each of the Virtual Machines created ( excluding `alpine1`)



### Step 1

#### Start and stop all the Virtual Machines created.

For the following step, the Virtual Machines created must be started once to generate the mac-address.
Expand All @@ -16,9 +24,9 @@ You can also Start and Stop from the Hyper-V Console.



#### Generate user-data-mac-address file.

### Step 2

#### Generate user-data-mac-address file.

For a Kubernetes cluster we will need multiple Virtual Machines. This will require multiple `user-data-mac-address` files to be created. Here I use PowerShell to generate the files.

Expand All @@ -28,7 +36,7 @@ Click on the `Green Play` button, this will execute the script.

The generated files are in the subfolder `.\autoinstall\`

![114-01-location-of-script](./../../screenshots\114-01-location-of-script.png)
![114-01-location-of-script](./../screenshots\114-01-location-of-script.png)



Expand Down
Binary file modified k3s-lab-setup/screenshots/114-01-location-of-script.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
125 changes: 0 additions & 125 deletions srv/autoinstall/autoinstall-user-data-master

This file was deleted.

135 changes: 0 additions & 135 deletions srv/autoinstall/autoinstall-user-data-worker

This file was deleted.

Loading

0 comments on commit 471573c

Please sign in to comment.