Plugin Engine Installation
Plugins in the CodeMie context enable remote and distributed invocation of Agent tooling. They also facilitate the decoupling of the CodeMie backend codebase, simplifying the development of user functionality. Running tooling remotely is important and enables several use cases:
- Running on a user workstation for development and research tasks
- Running in secure perimeters close to integrated applications
- Scaling tools for performance gains
- Enabling least privilege access
NATS based architecture enables seamless Assistant integration with tooling in any perimeter/appliance.
Install AI/Run CodeMie NATS Component
To deploy a NATS, follow the steps below:
-
Create
codemie-nats-secretsKubernetes secret. To set up it, follow these steps to generate and encode the necessary values:-
NATS_URL
- Since NATS is deployed in the same namespace as the AI/Run CodeMie and NATS Callout services, use the internal URL
nats://codemie-nats:443 - Base64 encode this URL before using it in the secret.
- Since NATS is deployed in the same namespace as the AI/Run CodeMie and NATS Callout services, use the internal URL
-
CALLOUT_USERNAME
- Use the username
callout. - Base64 encode this username before using it in the secret.
- Use the username
-
CALLOUT_PASSWORD
- Generate a secure password using the command:
pwgen -s -1 25. - Base64 encode this password before using it in the secret.
- Generate a secure password using the command:
-
CALLOUT_BCRYPTED_PASSWORD
- Use the NATS server to generate a bcrypt-hashed password based on the
CALLOUT_PASSWORD. - Command:
nats server passwd -p <CALLOUT_PASSWORD> - Base64 encode the bcrypt-hashed password before using it in the secret.
- Use the NATS server to generate a bcrypt-hashed password based on the
-
CODEMIE_USERNAME
- Use the username
codemie. - Base64 encode this username before using it in the secret.
- Use the username
-
CODEMIE_PASSWORD
- Generate a secure password using the command:
pwgen -s -1 25. - Base64 encode this password before using it in the secret.
- Generate a secure password using the command:
-
CODEMIE_BCRYPTED_PASSWORD
- Use the NATS server to generate a bcrypt-hashed password based on the
CODEMIE_PASSWORD. - Command:
nats server passwd -p <CODEMIE_PASSWORD> - Base64 encode the bcrypt-hashed password before using it in the secret.
- Use the NATS server to generate a bcrypt-hashed password based on the
-
ISSUER_NKEY and ISSUER_NSEED
- Use the
nsctool to generate NATS account keys. For example: https://natsbyexample.com/examples/auth/callout/cli - Command:
nsc generate nkey --account - Base64 encode the NKEY and NSEED before using them in the secret.
- Use the
-
ISSUER_XKEY and ISSUER_XSEED
- Use the
nsctool to generate NATS curve keys. For example: https://natsbyexample.com/examples/auth/callout/cli - Command:
nsc generate nkey --curve - Base64 encode the XKEY and XSEED before using them in the secret.
- Use the
Secret example:
apiVersion: v1
kind: Secret
metadata:
name: codemie-nats-secrets
type: Opaque
data:
NATS_URL: <base64-encoded-nats-url>
CALLOUT_USERNAME: <base64-encoded-callout-username>
CALLOUT_PASSWORD: <base64-encoded-callout-password>
CALLOUT_BCRYPTED_PASSWORD: <base64-encoded-callout-bcrypted-password>
CODEMIE_USERNAME: <base64-encoded-codemie-username>
CODEMIE_PASSWORD: <base64-encoded-codemie-password>
CODEMIE_BCRYPTED_PASSWORD: <base64-encoded-codemie-bcrypted-password>
ISSUER_NKEY: <base64-encoded-issuer-nkey>
ISSUER_NSEED: <base64-encoded-issuer-nseed>
ISSUER_XKEY: <base64-encoded-issuer-xkey>
ISSUER_XSEED: <base64-encoded-issuer-xseed>infoUse the following command
echo -n 'your-value-here' | base64to encode secret or usekubectlto create secret from (i.e.kubectl -n codemie create secret generic --from-literal NATS_URL=nats://codemie-nats:443 --from-literal CALLOUT_USERNAME=callout ...) -
-
Install
codemie-natshelm chart in created namespace, applying custom values file with the command:helm repo add nats https://nats-io.github.io/k8s/helm/charts/
helm repo update nats
helm upgrade --install codemie-nats nats/nats --version 1.2.6 \
--namespace codemie --values ./codemie-nats/values-azure.yaml \
--wait --timeout 900s
Install AI/Run CodeMie NATS Auth Callout Component
To deploy a NATS Auth Callout service, follow the steps below:
-
Install
codemie-nats-auth-callouthelm chart, applying custom values file with the command:helm upgrade --install codemie-nats-auth-callout \
"oci://europe-west3-docker.pkg.dev/or2-msq-epmd-edp-anthos-t1iylu/helm-charts/codemie-nats-auth-callout" \
--version "x.y.z" \
--namespace "codemie" \
-f "./codemie-nats-auth-callout/values-azure.yaml" \
--wait --timeout 600s
Next Steps
Proceed to Core Components installation.