Commit Graph

23 Commits

Author SHA1 Message Date
6087e1cd31 Copy config under a volume for Docker (similar to a ConfigMap for K8S). (#914)
All checks were successful
Lint Checks / Run linter (push) Successful in 42s
Publish / Build and publish (push) Successful in 1m15s
Deploy Test / Run deploy test suite (push) Successful in 4m43s
Webapp Test / Run webapp test suite (push) Successful in 4m40s
Smoke Test / Run basic test suite (push) Successful in 3m49s
Database Test / Run database hosting test on kind/k8s (push) Successful in 9m9s
Container Registry Test / Run contaier registry hosting test on kind/k8s (push) Successful in 3m33s
External Stack Test / Run external stack test suite (push) Successful in 4m34s
Fixturenet-Laconicd-Test / Run Laconicd fixturenet and Laconic CLI tests (push) Successful in 13m43s
K8s Deploy Test / Run deploy test suite on kind/k8s (push) Successful in 7m19s
This emulates the K8S ConfigMap behavior on Docker by using a regular volume.

If a directory exists under `config/` which matches a named volume, the contents will be copied to the volume on `create` (provided the destination volume is empty).  That is, rather than a ConfigMap, it is essentially a "config volume".

For example, with a compose file like:

```
version: '3.7'
services:
  caddy:
    image: cerc/caddy-ethcache:local
    restart: always
    volumes:
      - caddyconfig:/etc/caddy:ro
volumes:
  caddyconfig:
```

And a directory:

```
❯ ls stack-orchestrator/config/caddyconfig/
Caddyfile
```

After `laconic-so deploy create --spec-file caddy.yml --deployment-dir /srv/caddy` there will be:

```
❯ ls /srv/caddy/data/caddyconfig
Caddyfile
```

Mounted at `/etc/caddy`

Reviewed-on: #914
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-10 02:32:21 +00:00
1def279d26 Support multiple NodePorts, static NodePort mapping, and add 'replicas' spec option (#913)
All checks were successful
Lint Checks / Run linter (push) Successful in 33s
Publish / Build and publish (push) Successful in 1m7s
Smoke Test / Run basic test suite (push) Successful in 3m51s
Webapp Test / Run webapp test suite (push) Successful in 4m30s
Deploy Test / Run deploy test suite (push) Successful in 4m42s
Fixturenet-Laconicd-Test / Run Laconicd fixturenet and Laconic CLI tests (push) Successful in 12m52s
K8s Deploy Test / Run deploy test suite on kind/k8s (push) Successful in 7m27s
Database Test / Run database hosting test on kind/k8s (push) Successful in 9m35s
Container Registry Test / Run contaier registry hosting test on kind/k8s (push) Successful in 3m54s
External Stack Test / Run external stack test suite (push) Successful in 5m19s
NodePort example:

```
network:
  ports:
    caddy:
     - 1234
     - 32020:2020
```

Replicas example:

```
replicas: 2
```

This also adds an optimization for k8s where if a directory matching the name of a configmap exists in beneath config/ in the stack, its contents will be copied into the corresponding configmap.

For example:

```
# Config files in the stack
❯ ls stack-orchestrator/config/caddyconfig
Caddyfile  Caddyfile.one-req-per-upstream-example

# ConfigMap in the spec
❯ cat foo.yml | grep config
...
configmaps:
  caddyconfig: ./configmaps/caddyconfig

# Create the deployment
❯ laconic-so --stack ~/cerc/caddy-ethcache/stack-orchestrator/stacks/caddy-ethcache deploy create --spec-file foo.yml

# The files from beneath config/<config_map_name> have been copied to the ConfigMap directory from the spec.
❯ ls deployment-001/configmaps/caddyconfig
Caddyfile  Caddyfile.one-req-per-upstream-example
```

Reviewed-on: #913
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-09 02:32:06 +00:00
aef5986135 Allow gentx-files to be omitted
All checks were successful
Lint Checks / Run linter (pull_request) Successful in 34s
Webapp Test / Run webapp test suite (pull_request) Successful in 5m3s
Smoke Test / Run basic test suite (pull_request) Successful in 4m36s
Deploy Test / Run deploy test suite (pull_request) Successful in 5m13s
K8s Deploy Test / Run deploy test suite on kind/k8s (pull_request) Successful in 8m9s
2024-08-07 14:11:06 -06:00
7590d6e237 Add stage 1 support
All checks were successful
Lint Checks / Run linter (pull_request) Successful in 37s
Webapp Test / Run webapp test suite (pull_request) Successful in 6m10s
Smoke Test / Run basic test suite (pull_request) Successful in 6m9s
Deploy Test / Run deploy test suite (pull_request) Successful in 7m7s
K8s Deploy Test / Run deploy test suite on kind/k8s (pull_request) Successful in 9m57s
2024-08-07 11:28:10 -06:00
7d18334953 Mainnet-laconic stack fixes for laconicd2 (#904)
Some checks failed
Lint Checks / Run linter (push) Successful in 39s
Publish / Build and publish (push) Successful in 1m13s
Smoke Test / Run basic test suite (push) Successful in 4m7s
Webapp Test / Run webapp test suite (push) Successful in 4m35s
Deploy Test / Run deploy test suite (push) Successful in 4m58s
Fixturenet-Eth-Plugeth-Arm-Test / Run an Ethereum plugeth fixturenet test (push) Failing after 9m58s
Fixturenet-Eth-Plugeth-Test / Run an Ethereum plugeth fixturenet test (push) Failing after 10m55s
K8s Deploy Test / Run deploy test suite on kind/k8s (push) Successful in 7m44s
Database Test / Run database hosting test on kind/k8s (push) Successful in 9m15s
Container Registry Test / Run contaier registry hosting test on kind/k8s (push) Successful in 3m52s
External Stack Test / Run external stack test suite (push) Successful in 4m48s
Reviewed-on: #904
2024-07-31 13:51:28 +00:00
36d4969b2d Fixes for external stack deployment (#851)
All checks were successful
Lint Checks / Run linter (push) Successful in 37s
Publish / Build and publish (push) Successful in 1m10s
Deploy Test / Run deploy test suite (push) Successful in 5m1s
Smoke Test / Run basic test suite (push) Successful in 4m1s
Webapp Test / Run webapp test suite (push) Successful in 4m40s
Fixes
- stack path resolution for `build`
- external stack path resolution for deployments
- "extra" config detection
- `deployment ports` command
- `version` command in dist or source install (without build_tag.txt)
- `setup-repos`, so it won't die when an existing repo is not at a branch or exact tag

Used in cerc-io/fixturenet-eth-stacks#14

Reviewed-on: #851
Reviewed-by: David Boreham <dboreham@noreply.git.vdb.to>
2024-07-09 15:37:35 +00:00
13ce521d84 Fix config dir processing for external stacks (#810)
Some checks failed
External Stack Test / Run external stack test suite (push) Successful in 6m20s
Lint Checks / Run linter (push) Successful in 30s
Publish / Build and publish (push) Successful in 1m16s
Fixturenet-Laconicd-Test / Run Laconicd fixturenet and Laconic CLI tests (push) Successful in 18m56s
Webapp Test / Run webapp test suite (push) Successful in 3m46s
Deploy Test / Run deploy test suite (push) Successful in 5m17s
Fixturenet-Eth-Plugeth-Test / Run an Ethereum plugeth fixturenet test (push) Failing after 1s
Smoke Test / Run basic test suite (push) Successful in 4m41s
Fixturenet-Eth-Plugeth-Arm-Test / Run an Ethereum plugeth fixturenet test (push) Failing after 0s
K8s Deploy Test / Run deploy test suite on kind/k8s (push) Successful in 8m31s
Database Test / Run database hosting test on kind/k8s (push) Failing after 1s
Container Registry Test / Run contaier registry hosting test on kind/k8s (push) Successful in 4m25s
Reviewed-on: #810
Co-authored-by: David Boreham <david@bozemanpass.com>
Co-committed-by: David Boreham <david@bozemanpass.com>
2024-04-23 21:47:20 +00:00
6e4dae9777 Add external stack support (#806)
Some checks failed
Database Test / Run database hosting test on kind/k8s (push) Successful in 8m33s
Container Registry Test / Run contaier registry hosting test on kind/k8s (push) Successful in 3m45s
External Stack Test / Run external stack test suite (push) Successful in 4m41s
Lint Checks / Run linter (push) Successful in 41s
Publish / Build and publish (push) Successful in 1m22s
Deploy Test / Run deploy test suite (push) Successful in 4m58s
Webapp Test / Run webapp test suite (push) Successful in 4m27s
Smoke Test / Run basic test suite (push) Successful in 5m8s
Fixturenet-Laconicd-Test / Run Laconicd fixturenet and Laconic CLI tests (push) Successful in 14m11s
Fixturenet-Eth-Plugeth-Arm-Test / Run an Ethereum plugeth fixturenet test (push) Failing after 1s
K8s Deploy Test / Run deploy test suite on kind/k8s (push) Failing after 1s
Fixturenet-Eth-Plugeth-Test / Run an Ethereum plugeth fixturenet test (push) Failing after 3h8m0s
Reviewed-on: #806
Co-authored-by: David Boreham <david@bozemanpass.com>
Co-committed-by: David Boreham <david@bozemanpass.com>
2024-04-18 21:22:47 +00:00
2af6ffce77 Tweaks for running the container registry in k8s (#760)
All checks were successful
Lint Checks / Run linter (push) Successful in 23s
Publish / Build and publish (push) Successful in 1m30s
Webapp Test / Run webapp test suite (push) Successful in 3m11s
Deploy Test / Run deploy test suite (push) Successful in 4m22s
Smoke Test / Run basic test suite (push) Successful in 4m57s
Minor tweaks for running the container-registry in k8s.  The big change is not requiring --image-registry.

Reviewed-on: #760
Reviewed-by: David Boreham <dboreham@noreply.git.vdb.to>
2024-02-22 21:11:06 +00:00
b22c72e715 For k8s, use provisioner-managed volumes when an absolute host path is not specified. (#741)
Some checks failed
Lint Checks / Run linter (push) Successful in 45s
Publish / Build and publish (push) Successful in 1m22s
K8s Deploy Test / Run deploy test suite on kind/k8s (push) Failing after 3m20s
Deploy Test / Run deploy test suite (push) Successful in 5m28s
Webapp Test / Run webapp test suite (push) Successful in 4m28s
Smoke Test / Run basic test suite (push) Successful in 4m58s
In kind, when we bind-mount a host directory it is first mounted into the kind container at /mnt, then into the pod at the desired location.

We accidentally picked this up for full-blown k8s, and were creating volumes at /mnt.  This changes the behavior for both kind and regular k8s so that bind mounts are only allowed if a fully-qualified path is specified.  If no path is specified at all, a default storageClass is assumed to be present, and the volume managed by a provisioner.

Eg, for kind, the default provisioner is: https://github.com/rancher/local-path-provisioner

```
stack: test
deploy-to: k8s-kind
config:
  test-variable-1: test-value-1
network:
  ports:
    test:
     - '80'
volumes:
  # this will be bind-mounted to a host-path
  test-data-bind: /srv/data
  # this will be managed by the k8s node
  test-data-auto:
configmaps:
  test-config: ./configmap/test-config
```

Reviewed-on: #741
Co-authored-by: Thomas E Lackey <telackey@bozemanpass.com>
Co-committed-by: Thomas E Lackey <telackey@bozemanpass.com>
2024-02-14 21:45:01 +00:00
36bb068983
Add ConfigMap test. (#726)
* Add ConfigMap test.

* eof

* Minor tweak

* Trigger test

---------

Co-authored-by: David Boreham <david@bozemanpass.com>
2024-02-05 14:15:11 -06:00
2fcd416e29
Basic webapp deployer stack. (#722) 2024-02-02 19:05:15 -07:00
b398050787
Don't include volumes in spec if we don't have any. (#720) 2024-01-31 15:11:32 -06:00
12ec1bec43
Add ConfigMap support for k8s. (#714)
* Minor fixes for deploying with k8s and podman.

* ConfigMap support
2024-01-30 23:09:48 -06:00
b83030f63b
Use custom act with gitea. (#700)
* Use custom act with gitea.

* Make sure wget is available

* Fix repo url
2024-01-09 22:53:43 -06:00
15faed00de
Generate a unique deployment id for each deployment (#680)
* Move cluster name generation into a function

* Generate a unique deployment id for each deployment
2023-12-05 22:56:58 -07:00
113c0bfbf1
Propagate env file for webapp deployment (#669) 2023-11-28 21:14:02 -07:00
a68cd5d65c
Webapp deploy (#662) 2023-11-27 22:02:16 -07:00
87bedde5cb
Support for k8s ingress and tls (#659) 2023-11-21 16:04:36 -07:00
f6624cb33a
Add image push command (#656) 2023-11-20 20:23:55 -07:00
c9c6a0eee3
Changes for remote k8s (#655) 2023-11-20 09:12:57 -07:00
5e91c2224e
kind test stack (#629) 2023-11-08 01:11:00 -07:00
4456e70c93
Rename app -> stack_orchestrator (#625) 2023-11-07 00:06:55 -07:00