Nike-Inc / cerberus-lifecycle-cli

Command Line Interface for managing a Cerberus environment in AWS
http://nike-inc.github.io/cerberus
Apache License 2.0
13 stars 9 forks source link

Cross region logic checking prevents the creation of new Cerberus environments #125

Closed micheal-hill closed 5 years ago

micheal-hill commented 6 years ago

I've been trying to spike a cerberus setup following the instructions here. Created a new AWS account for cerberus and followed the instructions up until cerberus -f /path/to/yaml create-environment I've tried a few different options for the CLI but consistently receive an error to report:

java.lang.RuntimeException: Failed to find config bucket for region: AP_SOUTHEAST_2
    at com.nike.cerberus.store.ConfigStore.findConfigBucketInSuppliedConfigRegion(ConfigStore.java:644)
    at com.nike.cerberus.store.ConfigStore.getDecryptedEnvironmentData(ConfigStore.java:531)
    at com.nike.cerberus.store.ConfigStore.isConfigSynchronized(ConfigStore.java:755)
    at com.nike.cerberus.cli.CerberusRunner.run(CerberusRunner.java:134)
    at com.nike.cerberus.cli.CerberusRunner.main(CerberusRunner.java:275)

I've also tried providing the --region flag with us-west-2 but receive the same error message (with US_WEST_2 instead, of course).

Can anyone advise what this error is complaining about? Is there some setup I'm missing? I haven't come across any instructions to setup an S3 bucket for cerberus.

fieldju commented 5 years ago

@micheal-hill hey, thanks for opening this issue. This is a known bug that I thought @mayitbeegh fixed, that was introduced when we added logic to make sure config was synced cross region. This logic fails for the initial commands before the s3 buckets are created and the config even exists, a bit of a chicken and egg issue.

However there is a work around, you can use the following flag to skip that logic --skip-data-check

cerberus --skip-data-check -f /path/to/yaml create-environment

That will allow you to create the environment and allow that first set of config to get generated. Sorry for the inconvenience, I will make a ticket so that we don't lose track of this again.

fieldju commented 5 years ago

https://github.com/Nike-Inc/cerberus-lifecycle-cli/pull/128