Coder Social home page Coder Social logo

ec2-macos-utils's Introduction

EC2 macOS Utils

Overview

EC2 macOS Utils is a CLI-based utility that provides commands for customizing AWS EC2 Mac instances. Currently, there exists one command (grow) for resizing volumes to their maximum size. This is done by wrapping diskutil(8), gathering disk information, and resizing the disk.

Usage

The utility will be installed by default for all AMIs vended by AWS after December 8, 2021. ec2-macos-utils is also available as a cask for install and updates via AWS' Homebrew tap.

See the ec2-macos-utils docs for more information.

Global Flags

EC2 macOS Utils supports global flags that can be set with any command. The supported global flags are as follows:

  • --verbose or -v this flag enables more detailed information to be outputted.

Growing APFS Containers

ec2-macos-utils grow [flags]

The grow command resizes an APFS container to its maximum size. This is done by fetching all disk and system partition information, repairing the physical device to update partition information, calculating the amount of free space available, and resizing the container to its max size. Repairing the physical device is necessary in order to properly allocate the amount of available free space.

The grow command should be run with sudo as it requires root access in order to repair the physical disk.

See the grow docs for more information.

Building

ec2-macos-utils can be built using the provided Makefile. The default target compiles the executable with other targets provided for development & release activities. Each target has preset values that it uses but these can be overridden and tailored as needed.

Dependencies

This project requires the following build time dependencies:

  • Go
  • GNU Make

Build

make build
# or, alternatively use the default target to build:
make

This builds the ec2-macos-utils binary.

Generate Docs

make docs

This builds the ec2-macos-utils-docs binary which can be used to generate the latest command docs.

Tests

make test

This runs a cover of all Go tests in the package.

Imports

make imports

Run goimports to reformat source files according to gofmt.

Contributing

Please feel free to submit issues, fork the repository and send pull requests! See CONTRIBUTING for more information.

Security

See the Security section of CONTRIBUTING for more information.

License

This project is licensed under the Apache-2.0 License.

ec2-macos-utils's People

Contributors

amazon-auto avatar jahkeup avatar mattcataws avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

ec2-macos-utils's Issues

Add flag to suppress command errors

After adding ec2-macos-utils grow root container command to ec2-macos-init in aws/ec2-macos-init@97875d5, ec2-macos-init can be seen erroring on the new module when there isn't enough free space. For this case, it would be better to not error and return exit status 0 as the default EBS volume size for EC2 mac instances is 100GB with no available space to grow.

A new flag can be introduced to the CLI to suppress any error messages that might crop up due to a lack of available free space. This will allow ec2-macos-init to not log an expected failure case and continue without errors.

Example flag: --ignore-errors

Example usage:

ec2-macos-utils grow --id root --ignore-errors

Related issue - aws/ec2-macos-init#41

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.