Commit Graph

27 Commits (0c47da42feb2deec2bfc30c3a00bf15db1eeeb84)

Author SHA1 Message Date
Prathamesh Musale 0c47da42fe Integrate SP auctions in webapp deployment flow (#950)
Publish / Build and publish (push) Failing after 7s Details
Deploy Test / Run deploy test suite (push) Failing after 2s Details
Smoke Test / Run basic test suite (push) Failing after 2s Details
Lint Checks / Run linter (push) Failing after 2s Details
Webapp Test / Run webapp test suite (push) Failing after 3s Details
Part of [Service provider auctions for web deployments](https://www.notion.so/Service-provider-auctions-for-web-deployments-104a6b22d47280dbad51d28aa3a91d75) and https://git.vdb.to/cerc-io/stack-orchestrator/issues/948

- Add a command `publish-deployment-auction` to create and publish an app deployment auction
- Add a command `handle-deployment-auction` to handle auctions on deployer side
- Update `request-webapp-deployment` command to allow using an auction id in deployment requests
- Update `deploy-webapp-from-registry` command to handle deployment requests with auction
- Add a command `request-webapp-undeployment` to request an application undeployment

Reviewed-on: https://git.vdb.to/cerc-io/stack-orchestrator/pulls/950
Reviewed-by: ashwin <ashwin@noreply.git.vdb.to>
Co-authored-by: Prathamesh Musale <prathamesh.musale0@gmail.com>
Co-committed-by: Prathamesh Musale <prathamesh.musale0@gmail.com>
2024-10-21 07:02:06 +00:00
Thomas E Lackey fa21ff2627 Support uploaded config, add 'publish-webapp-deployer' and 'request-webapp-deployment' commands (#938)
Lint Checks / Run linter (push) Failing after 5s Details
Publish / Build and publish (push) Failing after 4s Details
Webapp Test / Run webapp test suite (push) Failing after 3s Details
Deploy Test / Run deploy test suite (push) Failing after 3s Details
Smoke Test / Run basic test suite (push) Failing after 3s Details
This adds two new commands: `publish-webapp-deployer` and `request-webapp-deployment`.

`publish-webapp-deployer` creates a `WebappDeployer` record, which provides information to requestors like the API URL, minimum required payment, payment address, and public key to use for encrypting config.

```
$ laconic-so publish-deployer-to-registry \
  --laconic-config ~/.laconic/laconic.yml \
  --api-url https://webapp-deployer-api.dev.vaasl.io \
  --public-key-file webapp-deployer-api.dev.vaasl.io.pgp.pub  \
  --lrn lrn://laconic/deployers/webapp-deployer-api.dev.vaasl.io  \
  --min-required-payment 100000
```

`request-webapp-deployment` simplifies publishing a `WebappDeploymentRequest` and can also handle automatic payment, and encryption and upload of configuration.

```
$ laconic-so request-webapp-deployment \
  --laconic-config ~/.laconic/laconic.yml \
  --deployer lrn://laconic/deployers/webapp-deployer-api.dev.vaasl.io \
  --app lrn://cerc-io/applications/webapp-hello-world@0.1.3 \
  --env-file ~/yaml/hello.env \
  --make-payment auto
```

Related changes are included for the deploy/undeploy commands for decrypting and using config, using the payment address from the WebappDeployer record, etc.

Reviewed-on: https://git.vdb.to/cerc-io/stack-orchestrator/pulls/938
2024-08-27 19:55:06 +00:00
Thomas E Lackey 75ff60752a Require payment for app deployment requests. (#928)
Lint Checks / Run linter (push) Failing after 4s Details
Publish / Build and publish (push) Failing after 5s Details
Deploy Test / Run deploy test suite (push) Failing after 3s Details
Webapp Test / Run webapp test suite (push) Failing after 3s Details
Smoke Test / Run basic test suite (push) Failing after 3s Details
Adds three new options for deployment/undeployment:

```
    "--min-required-payment",
    help="Requests must have a minimum payment to be processed",

    "--payment-address",
    help="The address to which payments should be made.  Default is the current laconic account.",

    "--all-requests",
    help="Handle requests addressed to anyone (by default only requests to my payment address are examined).",
```

In this mode, requests should be designated for a particular address with the attribute `to` and include a `payment` attribute which is the tx hash for the payment.

The deployer will confirm the payment (to the right account, right amount, not used before, etc.) and then proceed with the deployment or undeployment.

Reviewed-on: https://git.vdb.to/cerc-io/stack-orchestrator/pulls/928
Reviewed-by: David Boreham <dboreham@noreply.git.vdb.to>
Co-authored-by: Thomas E Lackey <telackey@bozemanpass.com>
Co-committed-by: Thomas E Lackey <telackey@bozemanpass.com>
2024-08-21 14:39:20 +00:00
Thomas E Lackey 952389abb0 Add option to recreate deployments rather than update them. (#920)
cherry-pick from https://git.vdb.to/cerc-io/stack-orchestrator/pulls/912

Reviewed-on: https://git.vdb.to/cerc-io/stack-orchestrator/pulls/920
Reviewed-by: David Boreham <dboreham@noreply.git.vdb.to>
2024-08-14 20:14:40 +00:00
Thomas E Lackey 5c275aa622 Defensively handle errors examining app requests. (#922)
Deploy Test / Run deploy test suite (push) Failing after 3s Details
Smoke Test / Run basic test suite (push) Failing after 3s Details
Lint Checks / Run linter (push) Failing after 2s Details
Publish / Build and publish (push) Failing after 4s Details
Webapp Test / Run webapp test suite (push) Failing after 3s Details
Related to https://git.vdb.to/cerc-io/webapp-deployment-status-api/issues/10

There are two issues in that.  One is that the output probably changed recently, whether in the client or server, where no matching record is found by ID (Note this is specific to `laconic record get --id <v>` and does not seem to apply to the similar command to retrieve a record by name, `laconic name resolve <n>`).

Rather than returning `[]` it is now returning `[ null ]`.  This cause us to think there *was* an application record found, and we attempt to treat the `null` entry like an Application object.  That's fixed by filtering out null responses, which is a good precaution for the deployer, though I think it makes sense to ask whether this new behavior by the client/server is correct.  Seems suspicious.

The other issue is that all the defensive checks we had in place to deal with broken/bad AppDeploymentRequests were around the _build_.  This error was coming much earlier, merely when parsing and examining the request to see if it needed to be handled at all.

I have now added similar defensive error handling around that portion of the code.

Reviewed-on: https://git.vdb.to/cerc-io/stack-orchestrator/pulls/922
Reviewed-by: zramsay <zramsay@noreply.git.vdb.to>
Co-authored-by: Thomas E Lackey <telackey@bozemanpass.com>
Co-committed-by: Thomas E Lackey <telackey@bozemanpass.com>
2024-08-14 18:04:31 +00:00
Thomas E Lackey 913c3a8557 Back to v2 now that we have a working webapp deployer build again. (#896)
Publish / Build and publish (push) Failing after 5s Details
Webapp Test / Run webapp test suite (push) Failing after 3s Details
Smoke Test / Run basic test suite (push) Failing after 3s Details
Lint Checks / Run linter (push) Failing after 3s Details
Deploy Test / Run deploy test suite (push) Failing after 3s Details
Reviewed-on: https://git.vdb.to/cerc-io/stack-orchestrator/pulls/896
Reviewed-by: David Boreham <dboreham@noreply.git.vdb.to>
Co-authored-by: Thomas E Lackey <telackey@bozemanpass.com>
Co-committed-by: Thomas E Lackey <telackey@bozemanpass.com>
2024-07-27 18:59:42 +00:00
Thomas E Lackey 2f5b0cdd13 Revert recent laconicd deployment changes to restore production webapp deployer function. (#895)
Deploy Test / Run deploy test suite (push) Failing after 5s Details
Publish / Build and publish (push) Failing after 5s Details
Webapp Test / Run webapp test suite (push) Failing after 3s Details
Smoke Test / Run basic test suite (push) Failing after 3s Details
Lint Checks / Run linter (push) Failing after 3s Details
Reviewed-on: https://git.vdb.to/cerc-io/stack-orchestrator/pulls/895
2024-07-27 17:04:03 +00:00
zramsay 80cff73344 crn --> lrn 2024-07-23 20:20:01 -04:00
zramsay 21b1270d27 fix lint 2024-07-23 20:16:16 -04:00
zramsay 008389dcd8 cns --> registry and other fixes 2024-07-23 20:10:06 -04:00
David Boreham 62f7825ec2 Remove quotes from git config 2024-07-05 09:55:14 -06:00
David Boreham 6d24d4a7e6 Set github auth token if present (#868)
Smoke Test / Run basic test suite (push) Failing after 3s Details
Deploy Test / Run deploy test suite (push) Failing after 3s Details
Publish / Build and publish (push) Failing after 5s Details
Webapp Test / Run webapp test suite (push) Failing after 3s Details
Lint Checks / Run linter (push) Failing after 4s Details
Reviewed-on: https://git.vdb.to/cerc-io/stack-orchestrator/pulls/868
Co-authored-by: David Boreham <david@bozemanpass.com>
Co-committed-by: David Boreham <david@bozemanpass.com>
2024-07-05 12:27:22 +00:00
David Boreham ca5fffaed5 Add logging to webapp deployer (#863)
Helps with diagnosing failures and odd behavior seen in the deployer in production.

Reviewed-on: https://git.vdb.to/cerc-io/stack-orchestrator/pulls/863
Co-authored-by: David Boreham <david@bozemanpass.com>
Co-committed-by: David Boreham <david@bozemanpass.com>
2024-07-04 19:46:42 +00:00
Thomas E Lackey d2442bcc9b revert 5308ab1e4e (#788)
Webapp Test / Run webapp test suite (push) Successful in 2m53s Details
Smoke Test / Run basic test suite (push) Successful in 9m10s Details
Lint Checks / Run linter (push) Failing after 3s Details
Publish / Build and publish (push) Successful in 1m36s Details
Deploy Test / Run deploy test suite (push) Successful in 4m4s Details
revert Blind commit to fix laconic CLI calls after rename. (#784)

`laconic cns` got renamed to `laconic registry` which breaks all the scripts and commands that use it.

Reviewed-on: https://git.vdb.to/cerc-io/stack-orchestrator/pulls/784
Co-authored-by: Thomas E Lackey <telackey@bozemanpass.com>
Co-committed-by: Thomas E Lackey <telackey@bozemanpass.com>

Reviewed-on: https://git.vdb.to/cerc-io/stack-orchestrator/pulls/788
2024-03-27 20:55:03 +00:00
Thomas E Lackey 5308ab1e4e Blind commit to fix laconic CLI calls after rename. (#784)
Webapp Test / Run webapp test suite (push) Successful in 3m12s Details
Publish / Build and publish (push) Successful in 59s Details
Deploy Test / Run deploy test suite (push) Successful in 4m32s Details
Smoke Test / Run basic test suite (push) Successful in 3m57s Details
Lint Checks / Run linter (push) Failing after 4s Details
`laconic cns` got renamed to `laconic registry` which breaks all the scripts and commands that use it.

Reviewed-on: https://git.vdb.to/cerc-io/stack-orchestrator/pulls/784
Co-authored-by: Thomas E Lackey <telackey@bozemanpass.com>
Co-committed-by: Thomas E Lackey <telackey@bozemanpass.com>
2024-03-25 19:09:26 +00:00
Thomas E Lackey 10e2311a8b Add timed logging for the webapp build (#771)
Add lots of log and timer output to webapp builds.

Reviewed-on: https://git.vdb.to/cerc-io/stack-orchestrator/pulls/771
2024-02-28 00:38:11 +00:00
Thomas E Lackey 6bd77c893a Even more logging fixes (#757)
Smoke Test / Run basic test suite (push) Successful in 4m30s Details
Publish / Build and publish (push) Successful in 1m36s Details
Webapp Test / Run webapp test suite (push) Successful in 2m42s Details
Lint Checks / Run linter (push) Failing after 3s Details
Deploy Test / Run deploy test suite (push) Successful in 3m29s Details
Hopefully the last one for a bit.

This only output the cmdline if log_file is present (ie, not to stdout).  It also fixes a bug where the log_file was not passed in one line.

Reviewed-on: https://git.vdb.to/cerc-io/stack-orchestrator/pulls/757
Co-authored-by: Thomas E Lackey <telackey@bozemanpass.com>
Co-committed-by: Thomas E Lackey <telackey@bozemanpass.com>
2024-02-22 01:24:44 +00:00
Thomas E Lackey 4a4d48ddb9 Fix error when logging exception. (#756)
Reviewed-on: https://git.vdb.to/cerc-io/stack-orchestrator/pulls/756
Co-authored-by: Thomas E Lackey <telackey@bozemanpass.com>
Co-committed-by: Thomas E Lackey <telackey@bozemanpass.com>
2024-02-22 00:11:06 +00:00
Thomas E Lackey 08438b1cd5 More logging for webapp deployments (#755)
Reviewed-on: https://git.vdb.to/cerc-io/stack-orchestrator/pulls/755
Co-authored-by: Thomas E Lackey <telackey@bozemanpass.com>
Co-committed-by: Thomas E Lackey <telackey@bozemanpass.com>
2024-02-21 23:48:52 +00:00
Thomas E Lackey 9f1dd284a5 Better error logging for registry deployments. (#754)
Publish / Build and publish (push) Successful in 52s Details
Lint Checks / Run linter (push) Failing after 3s Details
Webapp Test / Run webapp test suite (push) Successful in 2m43s Details
Smoke Test / Run basic test suite (push) Successful in 3m51s Details
Deploy Test / Run deploy test suite (push) Successful in 3m35s Details
We were missing errors related to registration, this should fix that.

Reviewed-on: https://git.vdb.to/cerc-io/stack-orchestrator/pulls/754
Co-authored-by: Thomas E Lackey <telackey@bozemanpass.com>
Co-committed-by: Thomas E Lackey <telackey@bozemanpass.com>
2024-02-21 20:12:52 +00:00
Thomas E Lackey 72ed2eb91a Fix bad test in tag check. (#738)
Publish / Build and publish (push) Successful in 50s Details
K8s Deploy Test / Run deploy test suite on kind/k8s (push) Failing after 1m3s Details
Webapp Test / Run webapp test suite (push) Successful in 3m2s Details
Smoke Test / Run basic test suite (push) Successful in 3m48s Details
Lint Checks / Run linter (push) Failing after 3s Details
Deploy Test / Run deploy test suite (push) Successful in 3m30s Details
Reviewed-on: https://git.vdb.to/cerc-io/stack-orchestrator/pulls/738
Co-authored-by: Thomas E Lackey <telackey@bozemanpass.com>
Co-committed-by: Thomas E Lackey <telackey@bozemanpass.com>
2024-02-08 20:38:41 +00:00
Thomas E Lackey d2ebb81d77 Tags for undeploy (#734)
Publish / Build and publish (push) Successful in 50s Details
Deploy Test / Run deploy test suite (push) Successful in 3m14s Details
Smoke Test / Run basic test suite (push) Successful in 3m53s Details
Lint Checks / Run linter (push) Failing after 4s Details
Webapp Test / Run webapp test suite (push) Successful in 2m42s Details
```
  --include-tags TEXT             Only include requests with matching tags
                                  (comma-separated).
  --exclude-tags TEXT             Exclude requests with matching tags (comma-
                                  separated).
```

Reviewed-on: https://git.vdb.to/cerc-io/stack-orchestrator/pulls/734
Co-authored-by: Thomas E Lackey <telackey@bozemanpass.com>
Co-committed-by: Thomas E Lackey <telackey@bozemanpass.com>
2024-02-07 21:45:16 +00:00
Thomas E Lackey 88a0236ca9 Add the ability to filter deployment requests by tag. (#730)
Lint Checks / Run linter (push) Failing after 10s Details
Deploy Test / Run deploy test suite (push) Successful in 3m5s Details
Smoke Test / Run basic test suite (push) Successful in 3m55s Details
Publish / Build and publish (push) Successful in 53s Details
Webapp Test / Run webapp test suite (push) Successful in 2m37s Details
Reviewed-on: https://git.vdb.to/cerc-io/stack-orchestrator/pulls/730
2024-02-07 03:12:40 +00:00
Thomas E Lackey 6629017d6a
Support other webapp types (react, static). (#721)
* Support other webapp types (react, static).
2024-02-02 18:04:06 -06:00
Thomas E Lackey 837e443800
Support application removal requests. (#697)
Publish / Build and publish (push) Successful in 1m10s Details
Deploy Test / Run deploy test suite (push) Successful in 3m18s Details
K8s Deploy Test / Run deploy test suite (push) Failing after 3m3s Details
Webapp Test / Run webapp test suite (push) Failing after 2m34s Details
Smoke Test / Run basic test suite (push) Successful in 4m12s Details
* Support application removal request.

* Git should never prompt when deploying a webapp
2023-12-21 18:05:40 -06:00
Thomas E Lackey 1f4eb57069
Add --dry-run option (#686)
Webapp Test / Run webapp test suite (push) Failing after 3m51s Details
Smoke Test / Run basic test suite (push) Successful in 3m59s Details
Publish / Build and publish (push) Successful in 56s Details
Deploy Test / Run deploy test suite (push) Successful in 3m12s Details
K8s Deploy Test / Run deploy test suite (push) Failing after 3m10s Details
2023-12-13 22:56:40 -06:00
Thomas E Lackey 88f66a3626
Add `deployment update` and `deploy-webapp-from-registry` commands. (#676) 2023-12-13 21:02:34 -06:00