Skip to content

Commit

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

Signed-off-by: Jared Burns <burnsja@vmware.com>
  • Loading branch information
burnsjared0415 authored Nov 3, 2023
1 parent eada41f commit f580733
Show file tree
Hide file tree
Showing 7 changed files with 70 additions and 0 deletions.
52 changes: 52 additions & 0 deletions docs/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](/power-validated-solutions-for-cloud-foundation/#powershell) of PowerShell installed.

Install the PowerShell [module dependencies](/power-validated-solutions-for-cloud-foundation/#module-dependencies) from the PowerShell Gallery by running the following commands:
Expand All @@ -16,6 +18,56 @@ For example:
--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"
```

To verify the correct versions of the supporting modules are installed, run the following command in the PowerShell console.

```powershell
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
5 changes: 5 additions & 0 deletions docs/snippets/import-module-local-linux.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
Import-Module -Name VMware.PowerCLI
Import-Module -Name VMware.vSphere.SsoAdmin
Import-Module -Name PowerVCF
Import-Module -Name PowerValidatedSolutions
Import-Module -Name ImportExcel
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
5 changes: 5 additions & 0 deletions docs/snippets/save-module-local-linux.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
Save-Module -Name VMware.PowerCLI -Path /home/modules
Save-Module -Name VMware.vSphere.SsoAdmin -Path /home/modules
Save-Module -Name PowerVCF -Path /home/modules
Save-Module -Name PowerValidatedSolutions -Path /home/modules
Save-Module -Name ImportExcel -Path /home/modules
5 changes: 5 additions & 0 deletions docs/snippets/save-module-local-windows.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
Import-Module -Name VMware.PowerCLI -Path F:\Module\
Import-Module -Name VMware.vSphere.SsoAdmin -Path F:\Module\
Import-Module -Name PowerVCF -Path F:\Module\
Import-Module -Name PowerValidatedSolutions -Path F:\Module\
Import-Module -Name ImportExcel -Path F:\Module\

0 comments on commit f580733

Please sign in to comment.