Skip to content
This repository has been archived by the owner on Aug 26, 2024. It is now read-only.

Commit

Permalink
Add logs directory to deployer arguments (#1169)
Browse files Browse the repository at this point in the history
  • Loading branch information
vponline authored Jan 22, 2023
1 parent 5dfe3bd commit b55cfc5
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 11 deletions.
5 changes: 5 additions & 0 deletions docs/airnode/v0.10/grp-providers/docker/deployer-image.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,11 @@ currently supports deploying to AWS and GCP. For AWS deployment, see the
and for GCP deployment, see the
[GCP Setup](../guides/build-an-airnode/configuring-airnode.md#gcp-setup-gcp-deployment-only).

## Deployer Logs

The deployer saves log files by default into the `config/logs/` direcotry, but
this can be changed by passing a `--logs` argument to the command.

## Deployer Image Commands

All three commands are similar for AWS and GCP, with differences noted where
Expand Down
31 changes: 20 additions & 11 deletions docs/airnode/v0.10/reference/packages/deployer.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ you to run deployer commands without installing the deployer npm package or
having to manually build the airnode-deployer package yourself.

```sh
npx @api3/airnode-deployer deploy --config config/config.json --secrets config/secrets.env --receipt config/receipt.json
npx @api3/airnode-deployer deploy --config config/config.json --secrets config/secrets.env --receipt config/receipt.json --logs config/logs/
```

### Global Package
Expand All @@ -62,7 +62,7 @@ yarn global add @api3/airnode-deployer
npm install @api3/airnode-deployer -g

# Executing the deployer.
airnode-deployer deploy --config config/config.json --secrets config/secrets.env --receipt config/receipt.json
airnode-deployer deploy --config config/config.json --secrets config/secrets.env --receipt config/receipt.json --logs config/logs/
```

<!-- HOLD THIS UNTIL THE REPO README IS UPDATED
Expand Down Expand Up @@ -136,6 +136,9 @@ in the `config/` directory, although a different path can be specified using the
path and name with the `--receipt` argument. The receipt contains metadata about
the deployment and can be used to remove the Airnode.

By default the deployer will save logs into the `config/logs/` directory, but
this can be changed with the `--logs` argument.

If the deployment isn't successful, the command will try to automatically remove
deployed resources. You can disable this by running the deploy command with a
`--no-auto-remove` argument.
Expand All @@ -151,14 +154,15 @@ Options:
-c, --configuration, --config, --conf Path to configuration file [string] [default: "config/config.json"]
-s, --secrets Path to secrets file [string] [default: "config/secrets.env"]
-r, --receipt Output path for receipt file [string] [default: "config/receipt.json"]
-l, --logs Output path for log files [string] [default: "config/logs/"]
--auto-remove Enable automatic removal of deployed resources for failed deployments
[boolean] [default: true]

# Basic example
airnode-deployer deploy

# Advanced example
airnode-deployer deploy --config config/config.json --secrets config/secrets.env --receipt config/receipt.json
airnode-deployer deploy --config config/config.json --secrets config/secrets.env --receipt config/receipt.json --logs config/logs/
```

### Listing Airnodes
Expand All @@ -180,6 +184,7 @@ Options:
--debug Run in debug mode [boolean] [default: false]
--help Show help [boolean]
-c, --cloud-providers Cloud providers to list Airnodes from [array] [choices: "aws", "gcp"] [default: ["aws","gcp"]]
-l, --logs Output path for log files [string] [default: "config/logs/"]

# Basic example
airnode-deployer list
Expand All @@ -203,9 +208,10 @@ Positionals:
deployment-id ID of the deployment (from 'list' command) [string] [required]
Options:
--version Show version number [boolean]
--debug Run in debug mode [boolean] [default: false]
--help Show help [boolean]
--version Show version number [boolean]
--debug Run in debug mode [boolean] [default: false]
--help Show help [boolean]
-l, --logs Output path for log files [string] [default: "config/logs/"]
# Example
airnode-deployer info aws2c6ef2b3
Expand All @@ -231,6 +237,7 @@ Options:
--debug Run in debug mode [boolean] [default: false]
--help Show help [boolean]
-o, --output-dir Where to store fetched files [string] [default: "config/"]
-l, --logs Output path for log files [string] [default: "config/logs/"]
# Example
airnode-deployer fetch-files aws2c6ef2b3
Expand All @@ -255,9 +262,10 @@ Positionals:
deployment-id ID of the deployment (from 'list' command) [string] [required]
Options:
--version Show version number [boolean]
--debug Run in debug mode [boolean] [default: false]
--help Show help [boolean]
--version Show version number [boolean]
--debug Run in debug mode [boolean] [default: false]
--help Show help [boolean]
-l, --logs Output path for log files [string] [default: "config/logs/"]
# Example
airnode-deployer remove aws2c6ef2b3
Expand All @@ -273,10 +281,11 @@ Options:
--debug Run in debug mode [boolean] [default: false]
--help Show help [boolean]
-r, --receipt Path to receipt file [string] [default: "config/receipt.json"]
-l, --logs Output path for log files [string] [default: "config/logs/"]
# Basic example
airnode-deployer remove-with-receipt
# Advanced example specifying the receipt file location
airnode-deployer remove-with-receipt --receipt config/receipt.json
# Advanced example specifying the receipt file and logs location
airnode-deployer remove-with-receipt --receipt config/receipt.json --logs config/logs/
```

1 comment on commit b55cfc5

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.