A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from http://cloud.google.com/run/docs/quickstarts/deploy-container below:

Quickstart: Deploy to Cloud Run | Cloud Run Documentation

Quickstart: Deploy to Cloud Run

This page shows you how to use Cloud Run to deploy a sample container.

Before you begin
  1. Sign in to your Google Cloud account. If you're new to Google Cloud, create an account to evaluate how our products perform in real-world scenarios. New customers also get $300 in free credits to run, test, and deploy workloads.
  2. In the Google Cloud console, on the project selector page, select or create a Google Cloud project.

    Note: If you don't plan to keep the resources that you create in this procedure, create a project instead of selecting an existing project. After you finish these steps, you can delete the project, removing all resources associated with the project.

    Go to project selector

  3. Verify that billing is enabled for your Google Cloud project.

  4. Make sure that you have the following role or roles on the project: Cloud Run Admin, Cloud Run Developer, Logs Viewer

    Check for the roles
    1. In the Google Cloud console, go to the IAM page.

      Go to IAM
    2. Select the project.
    3. In the Principal column, find all rows that identify you or a group that you're included in. To learn which groups you're included in, contact your administrator.

    4. For all rows that specify or include you, check the Role column to see whether the list of roles includes the required roles.
    Grant the roles
    1. In the Google Cloud console, go to the IAM page.

      Go to IAM
    2. Select the project.
    3. Click person_add Grant access.
    4. In the New principals field, enter your user identifier. This is typically the email address for a Google Account.

    5. In the Select a role list, select a role.
    6. To grant additional roles, click add Add another role and add each additional role.
    7. Click Save.
  5. In the Google Cloud console, on the project selector page, select or create a Google Cloud project.

    Note: If you don't plan to keep the resources that you create in this procedure, create a project instead of selecting an existing project. After you finish these steps, you can delete the project, removing all resources associated with the project.

    Go to project selector

  6. Verify that billing is enabled for your Google Cloud project.

  7. Make sure that you have the following role or roles on the project: Cloud Run Admin, Cloud Run Developer, Logs Viewer

    Check for the roles
    1. In the Google Cloud console, go to the IAM page.

      Go to IAM
    2. Select the project.
    3. In the Principal column, find all rows that identify you or a group that you're included in. To learn which groups you're included in, contact your administrator.

    4. For all rows that specify or include you, check the Role column to see whether the list of roles includes the required roles.
    Grant the roles
    1. In the Google Cloud console, go to the IAM page.

      Go to IAM
    2. Select the project.
    3. Click person_add Grant access.
    4. In the New principals field, enter your user identifier. This is typically the email address for a Google Account.

    5. In the Select a role list, select a role.
    6. To grant additional roles, click add Add another role and add each additional role.
    7. Click Save.
  8. Make sure that you have the Service Account User role granted on the service identity. By default, the service identity is the Compute Engine default service account.

    Grant the roles

    To grant access on the service identity resource, use the gcloud iam service-accounts add-iam-policy-binding command, replacing the highlighted variables with the appropriate values:

          gcloud iam service-accounts add-iam-policy-binding SERVICE_ACCOUNT_EMAIL \
              --member="PRINCIPAL" \
              --role="roles/iam.serviceAccountUser"
          

    Replace the following:

Deploying the sample container

To deploy a container, follow these steps:

  1. In the Google Cloud console, go to the Cloud Run page:

    Go to Cloud Run

  2. Select Services from the menu, and click Deploy container.

  3. In the Create service form, ensure the Deploy one revision from an existing container image option is selected.

  4. In the Create service page, for Container image URL, click Test with a sample container.

  5. In the Service name field, enter a service name or use the default value.

  6. In the Region list, use the default value us-central1, or select the region where you want to deploy your container.

  7. In the Authentication section, select Allow unauthenticated invocations.

  8. Click Create, and then wait for the container to deploy to Cloud Run. After deployment, the container's URL is displayed next to the text URL:.

  9. To view the running container, click content_copy Copy to clipboard to copy its URL, and then paste the URL into your browser's address bar.

    If you are under a domain restriction organization policy restricting unauthenticated invocations for your project, you will need to access your deployed service as described under Testing private services.

Cloud Run locations

Cloud Run is regional, which means the infrastructure that runs your Cloud Run services is located in a specific region and is managed by Google to be redundantly available across all the zones within that region.

Meeting your latency, availability, or durability requirements are primary factors for selecting the region where your Cloud Run services are run. You can generally select the region nearest to your users but you should consider the location of the other Google Cloud products that are used by your Cloud Run service. Using Google Cloud products together across multiple locations can affect your service's latency as well as cost.

Cloud Run is available in the following regions:

Subject to Tier 1 pricing Subject to Tier 2 pricing

If you already created a Cloud Run service, you can view the region in the Cloud Run dashboard in the Google Cloud console.

Success: You deployed a container that handles incoming web requests to Cloud Run.

Cloud Run automatically scales your container instances based on demand, and you only pay for the CPU, memory, and networking consumed during request processing.

What's next

To learn how to build a container from code source, push to Artifact Registry, and deploy, see:


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4