Appearance
Publishing
Deploy your plugins to the Noorle platform.
Overview
Publishing makes your plugin available on the Noorle platform where it can be used through MCP (Model Context Protocol) by AI agents. The process is straightforward and handles versioning automatically.
Prerequisites
Before publishing:
- Build your plugin - Must have
dist/plugin.wasm
- Authenticate - Must be logged in to Noorle
- Test locally - Ensure your plugin works with wasmtime
Authentication
First-Time Setup
bash
noorle login
This will:
- Display a device code and URL
- Open your browser automatically
- Complete authorization in browser
- Save token to
~/.noorle_token
Verify Authentication
bash
# Check if authenticated
noorle plugin deploy --dry-run
# Or verify token exists
ls -la ~/.noorle_token
Publishing Methods
Method 1: Build and Publish
The recommended approach - builds and deploys in one command:
bash
noorle plugin publish
This combines:
noorle plugin build
- Compiles your pluginnoorle plugin deploy
- Uploads to platform
Method 2: Separate Build and Deploy
For more control over the process:
bash
# Step 1: Build locally
noorle plugin build
# Step 2: Test the build
wasmtime run dist/plugin.wasm --invoke your-function "test"
# Step 3: Deploy when ready
noorle plugin deploy
Method 3: Deploy Specific Archive
Deploy a specific .npack
file:
bash
noorle plugin deploy path/to/my-plugin.npack
Useful when:
- You have multiple builds
- Deploying from CI/CD
- Redeploying previous versions
Method 4: Web Interface Upload
- Go to Noorle Console
- Navigate to Plugins → Upload
- Select your
.npack
file - Click "Upload"
The Publishing Process
What Happens When You Publish
- Package Creation - Your plugin is bundled into
.npack
- Upload - Secure transfer to Noorle platform
- Validation - Platform validates the component
- Version Creation - Automatic version assignment
- Activation - New version goes live immediately
- MCP Availability - Functions exposed as tools
The .npack Archive
The deployment package contains:
plugin.wasm
- Your compiled componentnoorle.yaml
- Configuration (if present)- Metadata for versioning
Example structure:
tree
my-plugin-abc123.npack
├── plugin.wasm
└── noorle.yaml
Version Management
Automatic Versioning
Noorle handles versioning automatically:
bash
# First deployment → Version 1
noorle plugin deploy
# Second deployment → Version 2
noorle plugin deploy
# Third deployment → Version 3
noorle plugin deploy
No manual version numbers needed!
Version Information
Each deployment creates a version with:
- Sequential version number
- Deployment timestamp
- Deployer identity
- Configuration snapshot
- Environment variables
Version History
View in Noorle Console:
- See all versions
- Compare configurations
- Track deployments
- Rollback if needed
Environment Variables
Setting During Deployment
bash
# Using environment file
noorle plugin deploy --env-file .env.production
# Setting individual variables
noorle plugin deploy --env API_KEY=prod-key --env DEBUG=false
# Combining both
noorle plugin deploy --env-file .env --env OVERRIDE_VAR=value
Environment File Format
Create .env.production
:
bash
API_KEY=your-production-key
SERVICE_URL=https://api.production.com
DEBUG_MODE=false
CACHE_TTL=3600
Important Notes
- Don't commit production
.env
files - Variables must be allowed in
noorle.yaml
- Values are encrypted on platform
- Update immediately on deployment
Publishing Output
Successful Publication
Building plugin...
✓ Build successful
✓ Created dist/my-plugin-abc123.npack
Deploying plugin...
Uploading: dist/my-plugin-abc123.npack (245 KB)
✓ Deployment successful!
Plugin Details:
ID: cap_xyz789
Name: my-plugin
Version: 3
Status: Active
Failed Publication
Deploying plugin...
✗ Deployment failed: Unauthorized
Please run 'noorle login' to authenticate
CI/CD Integration
GitHub Actions Example
yaml
name: Deploy to Noorle
on:
push:
branches: [main]
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Install Noorle CLI
run: curl -L cli.noorle.dev | sh
- name: Build Plugin
run: noorle plugin build
- name: Deploy to Noorle
env:
NOORLE_TOKEN: ${{ secrets.NOORLE_TOKEN }}
run: noorle plugin deploy --env-file .env.production
GitLab CI Example
yaml
deploy:
stage: deploy
script:
- curl -L cli.noorle.dev | sh
- noorle plugin build
- noorle plugin deploy
only:
- main
variables:
NOORLE_TOKEN: $CI_NOORLE_TOKEN
Best Practices
1. Test Before Publishing
bash
# Local testing
wasmtime run dist/plugin.wasm --invoke process "test"
# Run test suite
npm test # or cargo test, python test_app.py, etc.
2. Use Environment Files
Keep environments separate:
.env.development # Local development
.env.staging # Staging environment
.env.production # Production environment
3. Document Deployments
Add to your README:
markdown
## Deployment
```bash
# Production deployment
noorle plugin deploy --env-file .env.production
# Staging deployment
noorle plugin deploy --env-file .env.staging
### 4. Monitor After Publishing
After deployment:
1. Check Console for successful activation
2. Test through MCP client
3. Monitor for errors
4. Verify environment variables
### 5. Rollback Plan
If issues occur:
1. Go to Console → Plugins
2. Select your plugin
3. View version history
4. Activate previous version
## Publishing Checklist
Before publishing:
- [ ] Code reviewed and tested
- [ ] `noorle.yaml` permissions correct
- [ ] Environment variables documented
- [ ] Local testing passes
- [ ] Build completes successfully
- [ ] `.env` files prepared
- [ ] Authentication token valid
## Troubleshooting
### Authentication Issues
```bash
# Token expired or missing
noorle login
# Check token location
cat ~/.noorle_token
# Use different token
export NOORLE_TOKEN=your-token
noorle plugin deploy
Build Not Found
bash
# Ensure build exists
ls -la dist/*.npack
# Rebuild if necessary
rm -rf dist/
noorle plugin build
Upload Failures
Common causes:
- Network connectivity issues
- Token expired
- File too large (>50MB limit)
- Invalid plugin structure
Solutions:
bash
# Retry with verbose output
DEBUG=1 noorle plugin deploy
# Check file size
du -h dist/*.npack
# Validate structure
tar -tf dist/*.npack
Environment Variable Issues
bash
# Verify variables in config
grep -A5 "environment:" noorle.yaml
# Check variable names (case-sensitive)
cat .env.production
# Deploy with explicit variables
noorle plugin deploy --env API_KEY=test
Platform Limits
Deployment Limits
- File size: 50MB per plugin
- Environment variables: 20 per plugin
- Version history: Last 100 versions retained
- Deployment frequency: No limit
Runtime Limits
- Memory: 128MB (default), 512MB (max) per invocation
- CPU Time: Max 100ms per request
- Timeout: 30 seconds (default), 120 seconds (max)
- Module Size: 10MB compressed
See Usage Limits for complete details and optimization tips.
Security Considerations
Token Security
- Never commit tokens to git
- Use environment variables in CI/CD
- Rotate tokens periodically
- Revoke unused tokens
Environment Security
- Encrypt sensitive values
- Use different keys per environment
- Audit variable access
- Never log sensitive data
Code Security
- Review dependencies
- Minimize permissions
- Validate all inputs
- Handle errors gracefully
Next Steps
- Versioning - Understanding version management
- Configuration - Setting up noorle.yaml
- Testing - Local testing strategies