rpsene / nfs-server-on-powervs

A simple set of scripts to help on creating a NFS server at IBM Cloud on PowerVS

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

##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.

Step 0: PowerVS Preparation Checklist

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.

Step 1: Deploy

	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=

Step 2: Configure the NFS Server

	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

Step 3: Configure the NFS Client

	dnf install nfs-utils
	mkdir -p /data/nfs-storage
	mount <SERVER IP>:/data/nfs-storage /data/nfs-storage

Step 4: Details

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

About

A simple set of scripts to help on creating a NFS server at IBM Cloud on PowerVS

License:Apache License 2.0


Languages

Language:Shell 100.0%