Giter Club home page Giter Club logo

static-deployer's People

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

jonatanpotrikus

static-deployer's Issues

Support a "create" command

The create command (e.g.: static-deployer create ... ) should:

  1. Create the specified bucket (always private) if it doesn't exist;
  2. Create the CloudFront distribution if it doesn't exist;
    2.1. May need to support an SPA (single page application) flag;
    2.2. May need to support custom error responses for SPA - to redirect 404 to /index.html for example;
    2.3. Enable OAI to access a private S3 bucket;
  3. Create or associate domain and alternate domains;
  4. Create or associate SSL certificates from ACM (needs to issue them in the NV region due to AWS limitations);

deploy doesn't print any error when the it fails to find the informed origin

For instance, if the function update_distribution was unable to find the informed origin, it returns False and terminates immediately. It doesn't print any error message to inform the cause. See:
image

The function that invokes update_distribution also doesn't print any error message in case of failure. See:
image

We should at least print an error message to let the user know the failure cause.

Evaluate whether Click satisfies our requirements better than argparse

We currently have a limitation related to argparser's subparsers, which I'm still not sure how to properly fix.
If you specify a config file in the command, then the command argument MUST come after the config file argument. Example:

static-deployer -c config.toml deploy --version VERSION

We currently can't use the -c <file> argument after the command (subparser), example:

static-deployer deploy -c config.toml --version VERSION

With that in mind, Click looks like a powerful and elegant alternative to argparse.

Make the storage and cdn implementations mockable

Define interfaces for implementations that support the dry-run flag so we can mock those implementations and no longer require the dry-run flag to be passed around. A dummy example to explain:

if dry_run:
  cdn_impl = MockCdnImpl()
  storage_impl = MockStorageImpl()
else:
  cdn_impl = ReadCdnImpl()
  storage_impl = RealStorageImpl()
  
cdn_impl.do_something()
storage_impl.do_something()

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.