#!/bin/bash

# AMPPackager requires that you have 2 items so that auto-renewal of
# certificates work:
# - Certificate Signing Request (CSR)
# - Private key
# This can be autogenerated for you by the ./gcloud_up.sh script or you
# can manually create these by following the instructions in this link:
# https://docs.digicert.com/manage-certificates/certificate-profile-options/get-your-signed-http-exchange-certificate/
# If you manually generate these files, make sure to use the filenames that you
# specified below (e.g. AMP_PACKAGER_CSR_FILENAME value should be the name used for
# the CSR file).

# GCloud project information
# Note that if your project id is scoped by a domain, you need to replace the
# ':' with a '/'.  See: https://cloud.google.com/container-registry/docs/overview#domain-scoped_projects
# REQUIRED
export PROJECT_ID="YOUR_GCLOUD_PROJECT_ID"
# For compute zones, see: https://console.cloud.google.com/compute/zones
export COMPUTE_ENGINE_ZONE="YOUR_COMPUTE_ENGINE_ZONE"

# The version tag of the docker build of amppackager you want to build/use.
# You can leave it as the default unless you want to use a specific version
# of amppackager.
# OPTIONAL
export AMP_PACKAGER_VERSION_TAG="latest"

# The number of amppackager consumer replicas you'd like to run to which the
# load balancer can forward requests.
# OPTIONAL
export AMP_PACKAGER_NUM_REPLICAS=2

# The domain you want to use for the signed exchange.
# REQUIRED
export AMP_PACKAGER_DOMAIN="YOUR_AMP_PACKAGER_DOMAIN"
export AMP_PACKAGER_COUNTRY="YOUR_COUNTRY"
export AMP_PACKAGER_STATE="YOUR_STATE"
export AMP_PACKAGER_LOCALITY="YOUR_LOCALITY"
export AMP_PACKAGER_ORGANIZATION="YOUR_ORGANIZATION"

# ACME API related information
# REQUIRED
export ACME_EMAIL_ADDRESS="YOUR_ACME_EMAIL_ADDRESS"
export ACME_DIRECTORY_URL="YOUR_ACME_DIRECTORY_URL"

# The Signed Exchange Certificate you got from your certificate authority
# (Digicert) using the domain/location information above.
# OPTIONAL (if file is not present, amppackager renewer instance will try to
# retrieve one for you).
# DO NOT CHECK IN INTO GITHUB.
export AMP_PACKAGER_CERT_FILENAME="amppkg.cert"

# These files can be autogenerated.  You can choose replace it with your own
# file if desired but each file has to be present in your
# local amppackager/deploy/gcloud directory.
# OPTIONAL (if files are not present, script will autogenerate them for you)
# DO NOT CHECK THEM INTO GITHUB.
export AMP_PACKAGER_CSR_FILENAME="amppkg.csr"
export AMP_PACKAGER_PRIV_KEY_FILENAME="amppkg.privkey"

