Skip to content
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

Make dev machine plugins more configurable/modular #385

Open
gyuho opened this issue Jun 20, 2023 · 0 comments
Open

Make dev machine plugins more configurable/modular #385

gyuho opened this issue Jun 20, 2023 · 0 comments
Labels
enhancement New feature or request

Comments

@gyuho
Copy link
Collaborator

gyuho commented Jun 20, 2023

c.f., #376

ideally, we shouldn't hard-code plugin bootstrap script.

We can follow the pattern here:
https://github.com/gyuho/aws-manager/blob/main/examples/ec2_plugins.rs

And do something like

        UserData:
          Fn::Base64:
            Fn::Sub: |
              #!/usr/bin/env bash

              # install aws cli
              while [ 1 ]; do
                sudo rm -f /tmp/awscli-exe-linux-$(uname -m).zip || true;
                sudo apt-get update -yq && sudo apt-get install -yq wget unzip && wget --quiet --retry-connrefused --waitretry=1 --read-timeout=20 --timeout=15 --tries=70 --directory-prefix=/tmp/ --continue https://awscli.amazonaws.com/awscli-exe-linux-$(uname -m).zip
                if [ $? = 0 ]; then break; fi; # check return value, break if successful (0)
                sleep 2s;
              done;
              unzip /tmp/awscli-exe-linux-$(uname -m).zip && sudo ./aws/install
              /usr/local/bin/aws --version

              AWS_RETRY_MODE=standard AWS_MAX_ATTEMPTS=7 aws s3 cp s3://${S3BucketName}/${Id}/init.bash /tmp/init.bash
              bash /tmp/init.bash
@gyuho gyuho added the enhancement New feature or request label Jun 20, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant