Skip to main content
Version: Deploy 22.2

Verify oslogin and metadata ssh connection to GCP instance

This topic provides information on verifying OS login and metadata SSH connections to a GCP instance. It includes steps to ensure that OS login is properly configured and that SSH connections using metadata are functioning correctly.

Pre-requites before verifying oslogin and Metadata SSH connection to GCP instance

  • User should have account in GCP (Google Cloud Platform)
  • User should have created a project in GCP
  • User should have created a service account
  • Clone overthere repository.

Verify oslogin and Metadata SSH connection to GCP instance

To verify oslogin and Metadata SSH connection to GCP instance, do the following steps:

  1. Run the export GOOGLE_APPLICATION_CREDENTIALS=/path/to/jsonfile and start the Digital.ai Deploy server.

  2. Create DefaultGcpCredentials by hover over the Configuration, click Menu button then select New > credentials > gcp > DefaultGcpCredentials under the Configuration.

DefaultGcpCredentials

Provide the required inputs to the fields in the DefaultGcpCredentials:

  • Username
  • Password
  • Project ID
  • Client email address of the service account

DefaultGcpCredentials-Fields

  1. Create ServiceAccountFileGcpCredentials by hover over the Configuration, click Menu button then select New > credentials > gcp > ServiceAccountFileGcpCredentials under the Configuration.

ServiceAccountFileGcpCredentials

Provide the required inputs to the fields in the ServiceAccountFileGcpCredentials:

  • Username
  • Password
  • Service Account Credentials JSON File

ServiceAccountFileGcpCredentials-Fileds

  1. Create ServiceAccountJsonGcpCredentials by hover over the Configuration, click Menu button then select New > credentials > gcp > ServiceAccountJsonGcpCredentials under the Configuration.

ServiceAccountJsonGcpCredentials

Provide the required inputs to the fields in the ServiceAccountJsonGcpCredentials:

  • Username
  • Password
  • Service Account Credentials JSON File (copy and paste the credentials from JSON file).

ServiceAccountJsonGcpCredentials-Fields

  1. Create ServiceAccountPkcs8GcpCredentials by hover over the Configuration, click Menu button then select New > credentials > gcp > ServiceAccountPkcs8GcpCredentials under the Configuration.

ServiceAccountPkcs8GcpCredentials

Provide the required inputs to the fields in the ServiceAccountPkcs8GcpCredentials:

  • Username
  • Password
  • Project ID
  • Client ID service account
  • Client email address of the service account
  • RSA private key object for the service account in PKCS#8 format
  • Private key identifier for the service account.

ServiceAccountPkcs8GcpCredentials-Fields

  1. Create ServiceAccountTokenGcpCredentials by hover over the Configuration, click Menu button then select New > credentials > gcp > ServiceAccountTokenGcpCredentials under the Configuration.

ServiceAccountTokenGcpCredentials

Provide the required inputs to the fields in the ServiceAccountJsonGcpCredentials:

  • Username
  • Project ID
  • ApiToken

ServiceAccountTokenGcpCredentials-Fields

  1. Create MetadataSshKeysProvider by hover over the Configuration, click Menu button then select New > gcp > MetadataSshKeysProvider under the Configuration.

MetadataSshKeysProvider

Provide the required inputs to the fields

  • Credentials
  • Zone Name.

MetadataSshKeysProvider-Fields

  1. Create OsLoginSshHost and MetadataSshHost Cis from infrastructures, See create an infrastructure to know more information.

8.1 To create an OsLoginSshHost and MetadataSshHost hover over the Infrastructure, click Menu button then select New > overthere > gcp > OsLoginSshHost or MetadataSshHost under the Infrastructure.

OsLoginSshHost

MetadataSshHost

Provide the following values:

  • Operating system
  • Connection Type
  • Address
  • Port
  • Credentials o Select one of the credentials from steps 2 to 5 o Select the credential created in step 6 for metadata.

Image1 Image2

  1. Create two environment Metadata and oslogin and add the MetadataSshHost to MetaData environment and osLoginSshHost to oslogin environment respectively. See create an environment to know more information.

Metadata-Environment

Oslogin-Environment

  1. Create a cmd application or create and add file type to the cmd application. see create an application for more information.

Create-cmd-app

or

add-file-to-cmd-app

  1. Deploy the cmd/File type application to the oslogin environment using the following credentials:
  • DefaultGcpCredentials
  • ServiceAccountFileGcpCredentials
  • ServiceAccountJsonGcpCredentials
  • ServiceAccountPkcs8GcpCredentials
  • ServiceAccountTokenGcpCredentials

cmd-type-deployment

Note: File should be copied in case of file type deployment.

file-type-deployment

  1. Deploy the cmd/File type application to the Metadata environment by specifying any one of the following credentials at a time in MetadataSshKeysProvider:
  • DefaultGcpCredentials
  • ServiceAccountFileGcpCredentials
  • ServiceAccountJsonGcpCredentials
  • ServiceAccountPkcs8GcpCredentials
  • ServiceAccountTokenGcpCredentials

cmd-metadata-file-deployment

Note: File should be copied in case of file type deployment.

file-metadata-file-deployment

  1. Verify the SCP and SFTP supported connections by setting SCP and SFTP in below infrastructure CIs:

    1. Check oslogin connection by setting SCP and SFTP.

    oslogin-SCP-and-SFTP

    1. Check metadata connection by setting SCP and SFTP.

    metadata-SCP-and-SFTP

    Connection should be successful with SCP and SFTP on oslogin and metadata infrastructure CIs.

    successful-with-SCP-and-SFTP