%% readme.txt %% ntnx bash-scripts(version 1.0.1 Beta 0514.01)
-
Name: NTNX Bash REST Tool-Kit (NTNX-BaRT) (Bash v3.2, OSX 10.12.4)
-
Authors: M. Jastad ([email protected]), Reggie Allen ([email protected])
-
Date: Apr 19, 2017
BETA-0408.01
- Defects: added authentication to "config.sh".
- Defects: added ipaddress/port to "config.sh".
BETA-0414.01
- Feature: Separated files into "config.sh", "functions.sh", and "main.sh" for easy management.
BaRT is an open-source `VM Management’ resource enabling users to manage NTNX VM elements through RESTful control (allows the flexible use of REST API commands, relative addressing, macros, libraries, and bash programs).
BaRT is a bash-shell program which runs from shell command line and can be integrated with 3rd party scripts or runtimes directly.
BaRT will run on most platform(s) having a working Bash v3.2 installation or higher. However, there may of course be minor differences across various linux distributions.
BaRT has been tested using Mac OSX, 10.12.4 and BSD/Linux which the author(s) are familiar with. Feedback regarding installation and usage on other distributions would be greatly appreciated, followed by future updates (as needed).
BaRT is designed for Tech Summit 2017 as a guide for particiapnts to stand-up VM configurations on a Nutanix Cluster. BaRT is implemented in Bash in order to (a) greatly improve its utility, and (b) to make it available to the wide range of platforms which run Bash.
- Bash v3.2 (interpreters are available for windows, see https://www.cygwin.com/)
- jq 1.5
-
Open a terminal window and run the following command: ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" < /dev/null 2> /dev/null
-
Wait for the command to finish.
-
When complete, Run: brew install jq
-
Done! You can now use jq.
The following files are included in the BaRT package.
- config.sh -- Bash & REST runtime paramters (Access parameters)
- functions.sh -- Bash reusable functions for REST implementations and invocation.
- main.sh -- BaRT main driver
- README -- this file
File:
- file: ts-bash.osx-10.12.4.tar
- file: shell extracted using tar or RAR utilities. No checks for dependencies during install (extraction).
Install steps:
- Copy file to filesystem folder -- run: tar -xvf bash-script.osx-10.12.4.tar.
- Extraction will place files in "bash-scripts" folder.
- Edit config.h with appropriate ipaddress and port information for connection to the REST endpoint.
Execution(OS X):
- Insure that main.sh is executable by running: chmod +x main.sh
- From commandline, run: ./main.sh
Configure (config.sh):
- Set Host information (IPADDR and PORT)
- Set User credentials (USER, PASSWD)
- Set ISO_CONTAINER_NAME variable with the container name containing the iso images
- Set the DISK_CONTAINER_NAME variable with the default container used by VM for disk space...
- Set the OS_IMG_NAME variable with the name of the image to construct the target VM
- Set the NGT_IMG_NAME variable with the name of the Nutanix Gust Tools image needed by the target VM
The following describes the directory structure for BaRT installation.
- /bash-scripts % Executables and configuration files used to control execution.
This program is free software; Project Public License.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
Contact GitHub API Training Shop Blog About