By Lorne Kligerman, Product Manager
As a developer, your job is to provide a professional branded experience for your users. If you’re developing web apps, that means you’ll need to host your application on its own custom domain accessed securely over HTTPS with an SSL certificate.
With App Engine, it’s always been easy to access applications from their own hostname, e.g., <YOUR_PROJECT_ID>.appspot.com, but custom domains and SSL certificates could only be configured through the App Engine component of the Cloud Platform Console.
Today, we’re happy to announce that you can now manage both your custom domains and SSL certificates using the new beta features of the Admin API and gcloud command-line tool. These new beta features provide improved management, including the ability to automate mapping domains and uploading SSL certificates.
We hope these new API and CLI commands will simplify managing App Engine applications, help your business scale, and ultimately, allow you to spend more time writing code.
Managing App Engine custom domains from the CLI
To get started with the CLI, first install the Google Cloud SDK.
To use the new beta commands, make sure you’ve installed the beta component:
gcloud components install beta
And if you’ve already installed that component, make sure that it’s up to date:
gcloud components update
Now that you’ve installed the new beta command, verify your domain to register ownership:
gcloud beta domains verify <DOMAIN>
gcloud beta domains list-verified
After you’ve verified ownership, map that domain to your App Engine application:
gcloud beta app domain-mappings create <DOMAIN>
You can also map your subdomains this way. Note that as of today, only the verified owner can create mappings to a domain.
With the response from the last command, complete the mapping to your application by updating the DNS records of your domain.
To create an HTTPS connection, upload your SSL certificate:
gcloud beta app ssl-certificates create –display-name
<CERT_DISPLAY_NAME> –certificate <CERT_DIRECTORY_PATH>
–private-key <KEY_DIRECTORY_PATH>
Then update your domain mapping to include the certificate that you just uploaded:
gcloud beta app domain-mappings update <DOMAIN> –certificate-id
<CERT_ID>
We’re also excited to provide a single command that you can use to renew your certificate before it expires:
gcloud beta app ssl-certificates update <CERT_ID> –certificate
<CERT_DIRECTORY_PATH> –private-key <KEY_DIRECTORY_PATH>
As with all beta releases, these commands should not yet be used in production environments. For complete details, please check out the full set of instructions, along with the API reference. If you have any questions or feedback, we’ll be watching the Google App Engine forum, you can log a public issue, or get in touch on the App Engine slack channel (#app-engine).
Quelle: Google Cloud Platform
Published by