0.2.21 • Published 6 months ago

@genexus/d2c v0.2.21

Weekly downloads
-
License
ISC
Repository
github
Last release
6 months ago

deploy-to-cloud-frontend

Deploy to Cloud for GeneXus Frontend generators (ex: Angular)

This library provides CLIs in order to:

  • Request Deployment Authorization to GX D2C Cloud
  • Requst Cloud Provider Credentials to be able to make the Upload
  • Confirm a successful deployment to D2C

Usage

Generate Credentials for Static Deployment

d2c-prepare

Confirm Deployment with D2C

d2c-confirm

Configuration

#Required
SET D2C_AUTH=%AuthToken%
SET D2C_DEPLOY_ID=<guid>

#Optional (Default Value)
SET D2C_SERVER_TYPE=awss3  (default)
SET D2C_SERVER_ID=apps-angular.genexus.com (default)

D2C Required Services

1. Service: AuthorizeDeployment

This service is called before deploying to AWS S3, in order to get new Temporal AWS Credentials.

Request

POST Content-Type: Application/json

Body:

{
    "authToken": "myAuthToken",
    "path": "1234567",
    "serverId": "apps-angular.genexus.com",
    "serverType": "awss3",
    "appName": "MyFirstAngularApp"
}

Response

Content-Type: Application/json
{
    "code": 1,
    "credential": {
        "sessionToken": "dsfdsfs",
        "accessKeyId": "AKIA4EZIEMMO5XXXXXXX",
        "secretAccessKey": "xxxxxxx",
        "expiration": "2090-07-15T23:28:33.359Z",
        "type": "aws"
    },
    "properties": {
        "bucketName": "gx-angular-deployments"
    }
}

JSON Field Code

 ErrorCodes {
    ErrorUnknown = 0,
    Ok = 1,
    ErrorNotAuthorized = 2,
    TokenExpired = 3
}

Service Responsabilities:

  • Validate OAuth Token
  • Validate User is authorized to deploy on VDir ("path")
  • Validate server name: (apps-angular.genexus.com)
  • Call AWS STS Service to Request New Temporal Credential.

2. Service: ConfirmDeployment

This service is called after deploying to AWS S3, in order to notify D2C that a successfully deploy has been completed.

Request

POST Content-Type: Application/json

Body:

{
    "authToken": "myAuthToken",
    "path": "1234567",
    "serverId": "apps-angular.genexus.com",
    "serverType": "awss3",
    "appName": "MyFirstAngularApp",
    "deployStatus": DeployStatus
    ""
}

Response

Content-Type: Application/json
{
    "code":1,
    "description":"success"
}

JSON Field Code

 ErrorCodes {
    ErrorUnknown = 0,
    Ok = 1,
    ErrorNotAuthorized = 2,
    TokenExpired = 3
}

DeployStatus {
    ErrorUnknown = 0,
    Ok = 1,
    UploadFailed = 2
}

Service Responsabilities:

  • Validate OAuth Token
  • Validate User is authorized to deploy on VDir ("path")
  • Validate server name: (apps-angular.genexus.com)
  • Update Database with recent deployment
0.2.21

6 months ago

0.2.20

6 months ago

0.2.18

2 years ago

0.2.19

2 years ago

0.2.17

3 years ago

0.2.16

3 years ago

0.2.15

3 years ago

0.2.14

3 years ago

0.2.13

3 years ago

0.2.12

3 years ago

0.2.11

3 years ago

0.2.10

3 years ago

0.2.9

3 years ago

0.1.10

3 years ago

0.1.11

3 years ago

0.2.1

3 years ago

0.2.0

3 years ago

0.1.8

3 years ago

0.2.8

3 years ago

0.1.9

3 years ago

0.2.3

3 years ago

0.2.2

3 years ago

0.2.5

3 years ago

0.1.7

3 years ago

0.1.6

3 years ago

0.1.5

3 years ago

0.1.1

3 years ago

0.1.0

3 years ago