A volume template for the Blaxel platform that allows you to create reusable storage templates with prepopulated files and directories. Deploy this as a volume template, then create volumes from it that will automatically contain all your pre-configured files, perfect for sharing data, configurations, or resources across your agents and jobs.
- Reusable volume templates with prepopulated files and directories
- Create multiple volumes from a single template
- Easy file management and organization
- Seamless integration with Blaxel platform for cloud deployment
- Share data and configurations across multiple agents and jobs
- Version-controlled volume templates
- Simple two-step workflow: deploy template, create volumes
- Flexible volume mounting and access
For those who want to get up and running quickly:
# Create a volume template from this repository
bl new volumetemplate YOUR-TEMPLATE-NAME
# Navigate to the project directory
cd YOUR-TEMPLATE-NAME
# Add your files to the template directory
# (files you want to be prepopulated in volumes created from this template)
# Deploy the volume template to Blaxel
bl deploy
# Wait for your volume template to be deployed
bl get volumetemplate YOUR-TEMPLATE-NAME --watch- Blaxel Platform Setup: Complete Blaxel setup by following the quickstart guide
- Blaxel CLI: Ensure you have the Blaxel CLI installed. If not, install it globally:
curl -fsSL https://raw.githubusercontent.com/blaxel-ai/toolkit/main/install.sh | BINDIR=/usr/local/bin sudo -E sh - Blaxel login: Login to Blaxel platform
bl login YOUR-WORKSPACE
- Blaxel CLI: Ensure you have the Blaxel CLI installed. If not, install it globally:
Clone the repository:
git clone https://github.com/blaxel-ai/template-volume-empty.git
cd template-volume-emptyNo additional dependencies need to be installed. Simply add your files to the directory and deploy.
Add any files or directories you want to be prepopulated in volumes created from this template:
# Create directories
mkdir -p data/configs
# Add your files
cp /path/to/your/files/* data/
echo "Sample configuration" > data/configs/config.yaml
# Add any data, scripts, or resources you needAll files and directories in your template directory will be included in volumes created from it.
When you are ready to deploy your volume template to the cloud:
bl deployThis command uses your files and the configuration in blaxel.toml to deploy your volume template on the Blaxel platform.
Once your template is deployed, you can create volumes from it:
import { VolumeInstance } from "@blaxel/core";
const volume = await VolumeInstance.create({
name: "test-persistence-volume",
template: "YOUR-TEMPLATEE-NAME",
});You can create multiple volumes from the same template. Each volume will contain a copy of all the template's files. These volumes can then be attached to agents or jobs by referencing them in their configuration.
- blaxel.toml - Blaxel deployment configuration (volumetemplate type)
- Your files and directories - Add any files you want prepopulated in volumes created from this template
-
Template Deployment Issues:
- Ensure you're logged in to your workspace:
bl login MY-WORKSPACE - Verify volume template deployment:
bl get volumetemplates - Check that your
blaxel.tomlis properly configured for volumetemplate type
- Ensure you're logged in to your workspace:
-
File Issues:
- Ensure files you want to prepopulate are in the template directory before deploying
- Check file permissions if having access issues
- Verify file sizes are within reasonable limits
-
Volume Creation Issues:
- Verify the volume template is deployed:
bl get volumetemplates - Ensure you're referencing the correct template name when creating volumes
- Check volume creation status:
bl get volumes
- Verify the volume template is deployed:
-
Volume Access Issues:
- Verify the volume exists:
bl get volumes - Ensure agents/jobs are properly configured to mount the volume
- Ensure your Blaxel CLI is up to date
- Verify the volume exists:
For more help, please submit an issue on GitHub.
Contributions are welcome! Here's how you can contribute:
- Fork the repository
- Create a feature branch:
git checkout -b feature/amazing-feature
- Commit your changes:
git commit -m 'Add amazing feature' - Push to the branch:
git push origin feature/amazing-feature
- Submit a Pull Request
Please make sure to test your changes with Blaxel deployment.
If you need help with this template:
- Submit an issue for bug reports or feature requests
- Visit the Blaxel Documentation for platform guidance
- Check the Blaxel Volume Template Documentation for volume template-specific help
- Join our Discord Community for real-time assistance
This project is licensed under the MIT License. See the LICENSE file for more details.
