-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Autogenerate documentation for bootstrap-functions library (#27)
- Loading branch information
1 parent
f747ab1
commit 372fd09
Showing
13 changed files
with
301 additions
and
87 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
# bootstrap-functions | ||
This repository holds common functions that can be used in Qubole node bootstraps | ||
|
||
## How to use | ||
|
||
Source the required script in your bootstrap script. For example, to mount an EFS volume with the bootstrap, you may do the following: | ||
|
||
``` | ||
source /usr/lib/qubole/bootstrap-functions/misc/mount_nfs.sh | ||
|
||
mount_nfs fs-7abd2444.efs.us-east-1.amazonaws.com:/ /mnt/efs | ||
``` | ||
|
||
## Available functions | ||
The following set of functions are available at present: | ||
|
||
## Contributing | ||
Please raise a pull request for any modifications or additions you would like to make. There may be a delay between when you want to start using a method and when it might be available via Qubole's AMI. To work around this, it is recommended to put a placeholder `source` line in your bootstrap script. For example | ||
|
||
``` | ||
function mysparkfunction() { | ||
# ... do some stuff | ||
} | ||
|
||
source /usr/lib/qubole/bootstrap-functions/spark/mysparkfunction.sh | ||
|
||
mysparkfunction arg1 arg2 ... | ||
``` | ||
|
||
This way, when the function makes it to the AMI, you will automatically use the copy in the bootstrap-functions library. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
#!/usr/bin/env bash | ||
cd "$(dirname "$0")" | ||
|
||
# Cleanup older documentation | ||
mkdir -p docs | ||
rm -f docs/*.md | ||
|
||
# Generate new documentation | ||
directories=$(ls -d */ | grep -v "docs\|tests\|examples") | ||
for dx in ${directories}; do | ||
find ${dx} -type f -name "*.sh" -exec shdoc {} \; > docs/$(dirname ${dx}.).md | ||
done | ||
|
||
# Overwrite README.md | ||
cp -f README.md README.bak | ||
cp -f README.template README.md | ||
for dx in ${directories}; do | ||
d=$(dirname ${dx}.) | ||
sed -i "/The following set of functions are available at present:/a * [${d}](docs/${d}.md)" README.md | ||
done |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.