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

Bootstrap Container Version v0.1.0 #1

Merged
merged 4 commits into from
Aug 6, 2024

Conversation

CSHieuV
Copy link
Contributor

@CSHieuV CSHieuV commented Aug 6, 2024

Description of Changes:

Code to create Bootstrap container to run on a Bottlerocket host.

Testing Done:

  • A user can create the Bottlerocket instance and validate that changes specified in the user script have been applied successfully

Some user data used for testing can be seen below:

#!/usr/bin/env sh
set -euo pipefail
# Create the directory
mkdir -p /var/lib/my_directory
# Set API client configurations
apiclient set --json '{"settings": {"oci-defaults": {"resource-limits": {"max-open-files": {"soft-limit": 4294967296, "hard-limit": 8589934592}}}}}'
# Load kernel module
if command -v modprobe > /dev/null 2>&1; then
  modprobe dummy
fi
echo "User-data script executed."

Output from testing:

Test passed: Finished bootstrap container
Running Apiclient Setting Test...
API client output: {
  "settings": {
    "oci-defaults": {
      "resource-limits": {
        "max-open-files": {
          "hard-limit": 8589934592,
          "soft-limit": 4294967296
        }
      }
    }
  }
}
Apiclient Setting Test: PASSED
Running Kernel Test...
Kernel Test: PASSED
Running Directory Creation Test...
Directory Creation Test: PASSED
  • Testing for CA certs and s3 buckets also passed

Related PR's

Closes issue #2010

Terms of Contribution
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@CSHieuV CSHieuV changed the title Version v0.1.0 Bootstrap Container Version v0.1.0 Aug 6, 2024
Dockerfile Outdated
RUN chmod +x /usr/local/bin/bootstrap-script.sh

# Set the wrapper script as the entry point
ENTRYPOINT ["/usr/local/bin/bootstrap-script.sh"]
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: looks like we should include a newline here.

README.md Outdated

## Security
### Sample toml configuration
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit:

Suggested change
### Sample toml configuration
### Sample TOML configuration

README.md Outdated

This project is licensed under the Apache-2.0 License.
### Example runthrough
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

another nit:

Suggested change
### Example runthrough
### Example Walkthrough

Copy link

@yeazelm yeazelm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

Copy link
Contributor

@vyaghras vyaghras left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:shipit:

@vyaghras vyaghras merged commit 38c7a76 into bottlerocket-os:develop Aug 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants