Skip to content

Commit

Permalink
docs: add air-gapped install (#69)
Browse files Browse the repository at this point in the history
Adding documentation to install modules and dependencies in a air-gapped environment.

Signed-off-by: Jared Burns <burnsja@vmware.com>
  • Loading branch information
burnsjared0415 authored Nov 1, 2023
1 parent 3f142ad commit 0fe387f
Show file tree
Hide file tree
Showing 7 changed files with 66 additions and 0 deletions.
51 changes: 51 additions & 0 deletions docs/documentation/getting-started/install.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# Installing the Module

## From Powershell Gallery

Verify that your system has a [supported edition and version](/powershell-module-for-vmware-cloud-foundation-power-management/#powershell) of PowerShell installed.

Install the PowerShell [module dependencies](/powershell-module-for-vmware-cloud-foundation-power-management/#module-dependencies) from the PowerShell Gallery by running the following commands:
Expand All @@ -15,6 +17,55 @@ For example:
```powershell
--8<-- "./docs/snippets/import-module.ps1"
```
## From Air-gapped Machine

Verify that your system has a [supported edition and version](/powershell-module-for-vmware-cloud-foundation-password-management/#powershell) of PowerShell installed.

=== ":fontawesome-brands-windows: &nbsp; Windows"

Save Modules [module dependencies](/powershell-module-for-vmware-cloud-foundation-password-management/#module-dependencies) from the PowerShell Gallery on a non air-gapped machine by running the following commands:

```powershell
--8<-- "./docs/snippets/save-module-local-windows.ps1"
```

Copy the PowerShell Modules [module dependencies](/powershell-module-for-vmware-cloud-foundation-password-management/#module-dependencies) from the Local Machine to air-gapped facing machine by running the following commands:

```powershell
--8<-- "./docs/snippets/copy-module-local-windows.ps1"
```

Import the PowerShell Modules [module dependencies](/powershell-module-for-vmware-cloud-foundation-password-management/#module-dependencies) from the air-gapped machine by running the following commands:

```powershell
--8<-- "./docs/snippets/import-module.ps1"
```

=== ":fontawesome-brands-linux: &nbsp; Linux"

Prerequisite for module install on Linux Machine

```bash
--8<-- "./docs/snippets/pre-req-linux.sh"
```

Save Modules [module dependencies](/powershell-module-for-vmware-cloud-foundation-password-management/#module-dependencies) from the PowerShell Gallery on a non air-gapped machine by running the following commands:

```powershell
--8<-- "./docs/snippets/save-module-local-linux.ps1"
```

Copy the PowerShell Modules [module dependencies](/powershell-module-for-vmware-cloud-foundation-password-management/#module-dependencies) from the Local Machine to air-gapped facing machine by running the following commands:

```bash
--8<-- "./docs/snippets/copy-module-local-linux.sh"
```

Import the PowerShell Modules [module dependencies](/powershell-module-for-vmware-cloud-foundation-password-management/#module-dependencies) from the air-gapped machine by running the following commands in PowerShell:

```powershell
--8<-- "./docs/snippets/import-module-local-linux.ps1"
```

Once installed, any cmdlets associated with `VMware.CloudFoundation.PowerManagement` and the its dependencies will be available for use.

Expand Down
1 change: 1 addition & 0 deletions docs/snippets/copy-module-local-linux.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
scp -r /home/modules/* username@remote_host:/home/lab/.local/share/powershell/Modules/
1 change: 1 addition & 0 deletions docs/snippets/copy-module-local-windows.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Copy-Item -Path F:\Module\* -Destination '\\<destination_host>\C$\Program Files\WindowsPowerShell\Modules\' -Recurse
4 changes: 4 additions & 0 deletions docs/snippets/import-module-local-linux.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Import-Module -Name VMware.PowerCLI
Import-Module -Name PowerVCF
Import-Module -Name Posh-SSH
Import-Module -Name VMware.CloudFoundation.PowerManagement
1 change: 1 addition & 0 deletions docs/snippets/pre-req-linux.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
mkdir /home/modules
4 changes: 4 additions & 0 deletions docs/snippets/save-module-local-linux.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Save-Module -Name VMware.PowerCLI -MinimumVersion 13.0.0 -Path /home/modules
Save-Module -Name PowerVCF -MinimumVersion 2.3.0 -Path /home/modules
Save-Module -Name Posh-SSH -MinimumVersion 3.0.8 -Path /home/modules
Save-Module -Name VMware.CloudFoundation.PowerManagement -Path /home/modules
4 changes: 4 additions & 0 deletions docs/snippets/save-module-local-windows.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Save-Module -Name VMware.PowerCLI -MinimumVersion 13.0.0 -Path F:\Module\
Save-Module -Name PowerVCF -MinimumVersion 2.3.0 -Path F:\Module\
Save-Module -Name Posh-SSH -MinimumVersion 3.0.8 -Path F:\Module\
Save-Module -Name VMware.CloudFoundation.PowerManagement -Path F:\Module\

0 comments on commit 0fe387f

Please sign in to comment.