Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Kustomize provisioning Provider updates #910

Merged
merged 1 commit into from Nov 21, 2020
Merged

Conversation

Ropes
Copy link
Contributor

@Ropes Ropes commented Nov 12, 2020

Hold off on reviewing until after CI runs

Documentation updates for running a provider with kustomize configuration, running testing through the _run/single environment. Main problem was debugging our CLI situation which @hydrogen18 discovered is probably related to the methods used to access command flags.

  • akashctl -> akash binary(cleanup of old references)
  • akt -> uakt
  • Kubernetes upgraded to 1.19+ (_run/single)
  • Corrected akash params for configuration commands
  • Utilize local directories for kustomization files
  • Major change uses the cli flags to akash provider to pass
    configuration.
  • Running akash node name: akashd -> akash-node
  • Ingress accessible via: akash.localhost

fixes: https://github.com/ovrclk/akash/issues/909

@Ropes Ropes force-pushed the ropes/provider-updates branch 2 times, most recently from 400dd80 to b97b226 Compare November 13, 2020 22:41
Copy link
Contributor

@boz boz left a comment

Choose a reason for hiding this comment

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

looks awesome

_docs/examples/provider/README.md Outdated Show resolved Hide resolved
_docs/examples/provider/kustomization.yaml Outdated Show resolved Hide resolved
_docs/examples/provider/kustomization.yaml Outdated Show resolved Hide resolved
@@ -19,7 +19,7 @@ configMapGenerator:
literals:
- home=/home
- from=main
- node=tcp://akashd:26657
- node=http://akashd:26657
Copy link
Contributor

Choose a reason for hiding this comment

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

no longer tcp://?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

New sdk changes... seems like a weird config artifact that might get flipped back.

_docs/provider.yaml Show resolved Hide resolved
_run/common-kind.mk Outdated Show resolved Hide resolved
@@ -2,6 +2,7 @@ kind: Cluster
apiVersion: kind.x-k8s.io/v1alpha4
nodes:
- role: control-plane
image: kindest/node:v1.19.1@sha256:98cf5288864662e37115e362b23e4369c8c4a408f99cbc06e58ac30ddc721600
Copy link
Contributor

Choose a reason for hiding this comment

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

can you use just v1.19.1?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Following the kind docs. They suggest including the sha sum.

@Ropes Ropes force-pushed the ropes/provider-updates branch 2 times, most recently from 52fb904 to 59bf7a7 Compare November 16, 2020 20:29
export AKASHCTL_CHAIN_ID=testnet-v4
export AKASH_NODE=tcp://rpc-edgenet.akashdev.net:26657
export AKASH_CHAIN_ID=edgenet
export AKASH_KEYRING_BACKEND=test
Copy link
Contributor

Choose a reason for hiding this comment

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

Are these not read from the environment later on? I see the flags are used everywhere.

@hydrogen18
Copy link
Contributor

@boz the way that cosmos SDK is built it is mandatory to set --chain-id on the command line

@boz
Copy link
Contributor

boz commented Nov 17, 2020

@hydrogen18 what about these? if not, is the idea to just keep it consistent for now?

  • --keyring-backend
  • --home
  • --node

It's really a bummer. Maybe there are some quickfix solutions #908

@hydrogen18
Copy link
Contributor

For now the easiest solution is to just specify it everywhere, including examples so anyone looking at them nows to set them. In the kustomize scripts we can do stuff like --chain-id=$AKASH_CHAIN_ID to work around this until we fix it.

@Ropes
Copy link
Contributor Author

Ropes commented Nov 17, 2020

Yeah I'm going to second @hydrogen18, the envvar configuration doesn't work, the required flag burns us. For now unfortunately this verbose CLI configuration is the only way.

To make it messier, we can't just set a flag like --keyring-backend on every command, because the CLI will throw an error if it's supplied to a command which does not consume it.

@boz
Copy link
Contributor

boz commented Nov 18, 2020

In the kustomize scripts we can do stuff like --chain-id=$AKASH_CHAIN_ID to work around this until we fix it.

That's what is being done in the guide right now.

Yeah I'm going to second @hydrogen18, the envvar configuration doesn't work, the required flag burns us. For now unfortunately this verbose CLI configuration is the only way.

Again, it's only for --chain-id, right?

To make it messier, we can't just set a flag like --keyring-backend on every command, because the CLI will throw an error if it's supplied to a command which does not consume it.

It's not even being set on all key commands right now (see the export section).

Anyways, was any progress made on this today?

@Ropes
Copy link
Contributor Author

Ropes commented Nov 19, 2020

I need to rebase this, but otherwise are we good to merge?

* `akash` binary documentation cleanup.
  * `akashctl` -> `akash` binary
  * `akt` -> `uakt`

Upgrade kustomize configuration for Kubernetes 1.19

* Corrected `akash` params for configuration commands
* Utilize local directories for kustomization files
* Cleanup akash relevant namespaces with Make.

* Functional _run/single: akash + provider
  * Major change uses the cli flags to `akash provider` to pass
  configuration.
* Kustomize: rename Deployment/Ingress `akashd` -> `akash-node`
  * akash-node URL: akash.localhost (updated Makefiles)
  * Updated documentation
  * k8s internal service `akashd` -> `akash-node`

fixes: https://github.com/ovrclk/akash/issues/909

Signed-off-by: Josh Roppo <josh@akash.network>
```

### Configure Kubernetes Akash Namespace

Create the `akash-services` namespace for running Provider.

```sh
kubectl apply -f https://raw.githubusercontent.com/ovrclk/akash/master/_docs/kustomize/namespace.yaml
kubectl apply -f https://raw.githubusercontent.com/ovrclk/akash/master/_docs/kustomize/networking/namespace.yaml
Copy link
Contributor

Choose a reason for hiding this comment

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

I think we should reference this from the filesystem, rather than this document. Otherwise a user could get master which may have diverged.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I tend to agree with your point, however this namespace.yaml might be one of the few exceptions since it probably won't ever change.

For example files like deployment.yaml, or kustomization.yaml which will have version specific changes, are more fragile to break referencing master.

@Ropes Ropes merged commit cc01f0e into master Nov 21, 2020
@boz boz deleted the ropes/provider-updates branch April 3, 2021 16:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants