Build, test, integration and production bundled into a seamless, incrementally adoptable, application platform.
# Setup a local cluster + registry.$ ns prepare local # Start + develop your app server stack.$ ns dev # Run whole stack tests.$ ns test # Deploy to production.$ ns deploy --env=prod
What is Namespace?
Namespace combines the best development, testing and production workflows into a simple development experience that allows teams to build robust cloud-native server applications.
Exploring Namespace features
Namespace helps with many development and production journeys.
Below you'll find some of the key ones.
# Deploy frontends, api backends and database# servers from a single command.$ ns deploy multitier/01-simple/frontend Servers deployed: [✓] multitier/01-simple/frontend took 8.4s[✓] multitier/01-simple/apibackend took 5.7s[✓] multitier/01-simple/postgres took 69ms
server: {name: "myfrontendserver"integration: "nodejs"// Adds API backend to the deployed stackrequires: ["github.com/user/repo/apibackend",]}
# The only requirement is having Docker installed.$ curl -fsSL https://get.namespace.so/install.sh | sh Executing Namespace's installation script... Namespace was successfully installed to ~/.ns/bin/ns
$ ns prepare local [✓] Validate Docker version.[✓] Ensure local Kubernetes cluster is running (k3s in Docker). ... 🎉 "github.com/user/repo" is now configured forlocal development.
# Iterate on your server locally $ ns dev path/to/server # Run end-to-end tests$ ns test path/to/server # Push the final version to production $ ns deploy path/to/server --env=prod
$ ns dev multitier/01-simple/frontend Support services forwarded: [✓] postgres-server/postgres 127.0.0.1:5432 --> 5432 [✓] go-backend-server/webapi http://webapi-7sh5cg8.dev.nslocal.host:40080 Main services forwarded: [✓] frontend/frontend http://frontend-3nm0df.dev.nslocal.host:40080
# Create a new personal key.$ ns keys generate # Set a secret value.$ ns secrets set \ --secret=github.com/user/repo/server:passwordUpdated workspace.secrets (this file is encrypted). # Commit the encrypted file to git for simpler sharing.$ git add workspace.secrets
// Configures how to build and run API backend// and which servers it depends on. server: { name: "apibackendserver" integration: "go" requires: [ "github.com/user/repo/minio/server", ]}