def run():
    """Run the steps for the gcloud setup."""
    parser = argparse.ArgumentParser()
    parser.add_argument('--no-cloudshell',
                        action='store_true',
                        help='Bypass Cloud Shell requirement')
    parser.add_argument('--no-iam-check',
                        action='store_true',
                        help='Bypass IAM check for user running script')
    parser.add_argument('--branch', help='Which Forseti branch to deploy')

    group = parser.add_argument_group(title='regions')
    group.add_argument('--gcs-location', help='The GCS bucket location')
    group.add_argument('--cloudsql-region', help='The Cloud SQL region')

    network = parser.add_argument_group(title='network')
    network.add_argument('--network-host-project-id',
                         help='The project id that is hosting the network '
                         'resources.')
    network.add_argument('--vpc-name',
                         help='The VPC name where Forseti VM will run.')
    network.add_argument('--subnetwork-name',
                         help='The subnetwork name where Forseti VM will run.')

    email_params = parser.add_argument_group(title='email')
    email_params.add_argument('--sendgrid-api-key', help='Sendgrid API key')
    email_params.add_argument('--notification-recipient-email',
                              help='Notification recipient email')
    email_params.add_argument('--gsuite-superadmin-email',
                              help='G Suite super admin email')

    args = vars(parser.parse_args())
    forseti_setup = gcloud_env.ForsetiGcpSetup(**args)
    forseti_setup.run_setup()
def run():
    """Run the steps for the gcloud setup."""
    parser = argparse.ArgumentParser()
    group = parser.add_mutually_exclusive_group()
    group.add_argument('--branch', help='Which Forseti branch to deploy')
    group.add_argument('--version', help='Which Forseti release to deploy')

    args = vars(parser.parse_args())
    forseti_setup = gcloud_env.ForsetiGcpSetup(**args)
    forseti_setup.run_setup()
Exemple #3
0
def run():
    """Run the steps for the gcloud setup."""
    parser = argparse.ArgumentParser()
    parser.add_argument('--no-cloudshell',
                        action='store_true',
                        help='Bypass Cloud Shell requirement')
    parser.add_argument('--branch',
                        help='Which Forseti branch to deploy')
    group = parser.add_argument_group(title='regions')
    group.add_argument('--gcs-location',
                       help='The GCS bucket location')
    group.add_argument('--cloudsql-region',
                       help='The Cloud SQL region')

    args = vars(parser.parse_args())
    forseti_setup = gcloud_env.ForsetiGcpSetup(**args)
    forseti_setup.run_setup()