-
Notifications
You must be signed in to change notification settings - Fork 7
Added support for other Linux distributions #274
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
kcantrel
wants to merge
6
commits into
main
Choose a base branch
from
add_ubuntu_support
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 4 commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
45df4d8
Added support for other Linux distributions.
kcantrel 9c8caba
Added other Linux distribuation support.
kcantrel 060a093
Added support for more Linux disibutions.
kcantrel d0cc95d
Added support for more Linux disibutions.
kcantrel eb9de43
Add support for multiple Linux distributions.
kcantrel a7a2b6f
Merge branch 'main' into add_ubuntu_support
kcantrel File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 hidden or 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
69 changes: 69 additions & 0 deletions
69
Management-Utilities/ec2-user-data-iscsi-create-and-mount/build_linux_userData
This file contains hidden or 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,69 @@ | ||
| #!/bin/bash | ||
| # | ||
| # Since, for some reason, the maximum size of a EC2 User Data script is | ||
| # 16KB we have to compress the real script, with some logic to uncompress | ||
| # it on the EC2 instance when it is deployed, and then pass that as the | ||
| # user data content. | ||
| # | ||
| # This script is used to create the linux_userData.sh script from the | ||
| # linux_userdata_real.sh file. | ||
|
kcantrel marked this conversation as resolved.
Outdated
|
||
| ################################################################################ | ||
|
|
||
| cat <<'EOF' > linux_userData.sh | ||
| #!/bin/bash | ||
| # | ||
| # Set the ARN of the secret that should contain just the password for the ONTAP admin user set below. | ||
| SECRET_ARN="" | ||
| # | ||
| # Set the FSx admin IP. | ||
| FSXN_ADMIN_IP="" | ||
| # | ||
| # Set the name of the volume to be created on the FSx for ONTAP file system. Note, volume names cannot have dashes in them. | ||
| VOLUME_NAME="" | ||
| # | ||
| # Set the volume size in GB. It should just be a number, without the 'GB' suffix. | ||
| VOLUME_SIZE= | ||
| # | ||
| # Set the SVM name. The default is 'fsx'. | ||
| SVM_NAME="fsx" | ||
| # | ||
| # Set the ONTAP admin user. The default is fsxadmin. | ||
| ONTAP_USER="fsxadmin" | ||
| # | ||
| ################################################################################ | ||
| # **** You should not need to edit anything below this line **** | ||
| ################################################################################ | ||
| # | ||
| # When called from the CloudFormation template, the parameters are passsed as | ||
| # arguments. | ||
| SECRET_ARN="${SECRET_ARN:=$1}" | ||
| FSXN_ADMIN_IP="${FSXN_ADMIN_IP:=$2}" | ||
| VOLUME_NAME="${VOLUME_NAME:=$3}" | ||
| VOLUME_SIZE="${VOLUME_SIZE:=$4}" | ||
| SVM_NAME="${5:-$SVM_NAME}" | ||
| ONTAP_USER="${6:-$ONTAP_USER}" | ||
| # | ||
| # Since AWS only allows up to 16KB for the user data script, the rest of this script | ||
| # will be the compressed version of the linux_userData_real.sh file, which will be | ||
| # uncompressed and executed on the EC2 instance when it is deployed. | ||
| cat <<EOF2 > /tmp/linux_userData.sh | ||
| #!/bin/bash | ||
| export SECRET_ARN="$SECRET_ARN" | ||
| export FSXN_ADMIN_IP="$FSXN_ADMIN_IP" | ||
| export VOLUME_NAME="$VOLUME_NAME" | ||
| export VOLUME_SIZE="$VOLUME_SIZE" | ||
| export SVM_NAME="$SVM_NAME" | ||
| export ONTAP_USER="$ONTAP_USER" | ||
| EOF2 | ||
|
|
||
| cat <<EOF3 | base64 -d | gunzip >> /tmp/linux_userData.sh | ||
| EOF | ||
|
|
||
| cat linux_userData_real.sh | gzip -c | base64 >> linux_userData.sh | ||
|
|
||
| cat <<EOF4 >> linux_userData.sh | ||
| EOF3 | ||
|
|
||
| chmod +x /tmp/linux_userData.sh | ||
| /tmp/linux_userData.sh | ||
| EOF4 | ||
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.