Playing with Service Accounts | Scribe

    Playing with Service Accounts

    • Hafeez Baig |
    • 24 steps |
    • 2 minutes
    1
    Sign in into the **Google Cloud Platform**
    2
    Type "**Service Accounts**" in the search bar and click on the **Service Accounts** option
    information ordinal icon
    **What are Service Accounts?**\ \ In Google Cloud Platform (GCP), service accounts are used by applications or services to securely interact with GCP resources. They authenticate via credentials and are assigned specific roles and permissions to control access. By operating with defined permissions, service accounts help manage and secure interactions between services and resources, ensuring both authentication and authorization are handled effectively.
    3
    Click on the **CREATE SERVICE ACCOUNT** button
    4
    **Create service account** wizard will open, give the name as - "**compute-engine-service-account-with-bucket-creation**"
    information ordinal icon
    Refer to this guide to learn about Service Acount\ <https://scribehow.com/shared/Getting_Started_with_Service_Accounts__VNCoZDUEQl-ZQ3NoP7o2Pg>
    5
    Scroll to the **Select a role** dropdown section, search and click on the option **Compute Instance Admin (beta),** then click on the **DONE** button
    6
    Type "**VM instances**" in the search bar and click on the **VM instances** option
    information ordinal icon
    **What are VM instances?**\ \ VM instances in Google Cloud Platform (GCP) are virtual machines that run on Compute Engine. They provide scalable, on-demand computing resources for a wide range of applications and services. Each VM instance can be customized with different configurations, such as CPU, memory, and storage, and can run various operating systems. VM instances support automated scaling, load balancing, and integration with other GCP services, making them suitable for tasks like hosting websites, running applications, and performing data analysis.
    7
    **VM instances** wizard will open, click on the **CREATE INSTANCE** button
    8
    Give the Name as - "**my-vm-instance-that-talks-to cloud-storage**"
    9
    Scroll to the **Identity and API access** section
    10
    Scroll to the **Service account** dropdown section and select the option **compute-engine-service-account-with-bucket-creation**
    11
    Scroll the page and click on the **CREATE** button
    information ordinal icon
    Congratulations! you have successfully created a VM Instance
    12
    On the right side scroll to the **Connect** section and click on the **SSH** button
    information ordinal icon
    **What is SSH?**\ \ SSH, or Secure Shell, is a network protocol used to securely access and manage remote systems over an unsecured network. It provides a secure channel for connecting to and controlling remote servers or devices, typically through a command-line interface. SSH uses encryption to protect the data transmitted between the client and server, ensuring that sensitive information, such as login credentials and command outputs, is secure. It is commonly used for system administration, file transfers, and remote command execution.
    13
    **Establishing connection to SSH server** wizard will open
    14
    **SSH in browser** wizard will open, type the command "**gsutil mb gs://bucket-in28minutes-1-1**"
    information ordinal icon
    **What is the command gsutil mb gs://bucket-in28minutres-1-1?**\ \ The command `gsutil mb gs://bucket-in28minutres-1-1` is used to create a new Google Cloud Storage bucket. Here's a breakdown: - `gsutil`: This is a command-line tool for interacting with Google Cloud Storage. - `mb`: Stands for "make bucket," which is the command to create a new bucket. - `gs://bucket-in28minutres-1-1`: This specifies the name of the bucket to be created. The `gs://` prefix denotes that it is a Google Cloud Storage bucket. In this command, `bucket-in28minutres-1-1` is the desired name for the new bucket.