##About
This is a simple se of scripts that creates a new VM in PowerVS with aditional storage and configures it as NFS server. It works with either CentOS or RHEL.
- Create a paid IBM Cloud Account.
- Create an API key.
- Add a new instance of an Object Storage Service (or reuse any existing one):
- Create a new bucket.
- Create a new credential with HMAC enabled.
- Create and upload (or just upload if you already have it) the required .ova images.
- Add a new instance of the Power Virtual Service.
- Create a private network and create a support ticket to enable connectivity between the VMs within this private network. Take a look at this video to learn how to create a new support ticket.
- Create the boot images.
You need to ensure you already have the boot images available in your PowerVS instance. Also, you need to install the ibmcloud CLI and connect to IBM Cloud. Consider using the PowerVS Actions to get started and create a required public network. An ova CentOS8 image is available here for your convenience.
vi ./deploy.sh and add the respective values for these variables:
VOLUME_SIZE=
SERVER_IMAGE=
PRIVATE_NETWORK=
PUBLIC_NETWORK=
SSH_KEY_NAME=
SERVER_MEMORY=
SERVER_PROCESSOR=
SERVER_SYS_TYPE=
ssh root@<SERVER IP>
./create-nfs.sh <DEVICE>
NOTES: you just need to set the last part of the device, for instance
(assuming you have /dev/mapper/mpatha):
./create-nfs.sh mpatha
dnf install nfs-utils
mkdir -p /data/nfs-storage
mount <SERVER IP>:/data/nfs-storage /data/nfs-storage
You can get the ID of the VM and the additional storage created by looking at the directory created for each deployment. The file called server-build.log contains the details. You can use the PowerVS Actions to delete those resources when needed.
➜ nfs-server-powervs git:(master) ✗ tree -L 2
.
├── README.md
├── deploy.sh
├── nfs-server-0d3a56c8e5
│ ├── server-build.log
│ ├── server.log
│ └── volume.log