Workspaces

Workspaces

You can create your first Workspace for accessing a cloud-based development environment ready to code, with the option to clone an existing git repository if you have one, the coding stack of your preference and your extras. Demeter allows you to set the workspace size depending on your Project needs, the network to connect, your workspace's name, the Git Author, the Git Email, and a token to be used for authentication.






Once you have customized your development environment, select the Create button to start provisioning your workspace.


Keep in mind that it is important to be connected to the Cardano Node of the same network of your project.


When it's ready, select the Open VS Code button to open the Dev console. You can also view Logs in real-time, change the size and network of your workspace and start it or pause it when you are done using it. On the same screen, you can choose your coding toolchain, add extra functionality to your workspace, expose ports, see the storage used by your workspace, connect extensions to your project and see a list of available environmental variables inside your workspace that can be used to access your connected extensions.




There is no limit to the number of Workspaces you can create or run in parallel under a Project. But keep in mind that each Workspace you have created will consume Resources for your Project. Always keep only the Workspaces you need to optimize your resources consumption. By selecting the Dashboard button at the top, you can see the details of your DCUs usage at the end of the page.


⚠️

Running a Workspace consumes a considerable amount of resources. Always remember to Pause your Workspace when you are done using it. To learn more about managing resources consumption, read our guide about DCUs.

Coding Stack

Select the set of tools and libraries to have pre-installed automatically in your Workspace:

NameStack
plutusVSCode + Haskell + GHC + Cabal + Nix. The latest Cardano derivations from IOHK Nix cache.
haskellVSCode + Haskell + GHC. Good for starting from scratch with the Haskell language.
typescriptVSCode + NodeJS + Typescript. Good for creating frontends using Berry-Pool's Lucid framework.
rustVSCode + Rust + Cargo. Good for creating projects using Pallas building blocks
golangVSCode + Golang. Good for creating projects using CloudStruct Ouroboros library.
pythonVSCode + Python 3.8. Good for creating projects using the PyCardano framework.
javaVSCode + OpenJDK 17 + Gradle + Maven. Good for creating projects using the Java language.

Workspace Size

NameDescription
smallcpu: 1 - mem: 4 Gb - disk: 10 Gb
mediumcpu: 2 - mem: 8 Gb - disk: 50 Gb
largecpu: 4 - mem: 16 Gb - disk: 100 Gb

Git Author

Sets the git global configuration user.name

Git email

Sets the git global configuration user.email

Once you have selected your Workspace settings, press the CREATE WORKSPACE button to get it started. Your Workspace will start provisioning automatically.


When provisioning is completed and all dependencies installed, you can press the OPEN VSCODE button to open a ready-to-code environment.


vs code

Repository

If no repository is selected, we will generate an empty coding environment with the chosen tech stack, but if you have a Project with a dependency on Cardano infrastructure it's easy to integrate it with Demeter (opens in a new tab) to have it up and running in a Workspace in no time. Just include our CTA button in your Project for starting a Workspace with your repository code automatically cloned, providing a seamless experience for your users when running and trying your application.

Code in Workspace

Adding the button badge to your Readme
![Code in Workspace](https://demeter.run/code/badge.svg)
Setting the button link
(https://demeter.run/code?repository={YOUR REPOSITORY URL}&template={YOUR TECH STACK NAME}&size={YOUR WORKSPACES SIZE})

Available tech stacks

NameStack
plutusVSCode + Haskell + GHC + Cabal + Nix. The latest Cardano derivations from IOHK Nix cache.
haskellVSCode + Haskell + GHC. Good for starting from scratch with the Haskell language.
typescriptVSCode + NodeJS + Typescript. Good for creating frontends using Berry-Pool's Lucid framework.
rustVSCode + Rust + Cargo. Good for creating projects using Pallas building blocks
golangVSCode + Golang. Good for creating projects using CloudStruct Ouroboros library.
pythonVSCode + Python 3.8. Good for creating projects using the PyCardano framework.

Available workspaces sizes

NameDescription
smallcpu: 1 - mem: 4 Gb - disk: 10 Gb
mediumcpu: 2 - mem: 8 Gb - disk: 50 Gb
largecpu: 4 - mem: 16 Gb - disk: 100 Gb
Example URL
(https://demeter.run/code?repository=https://github.com/txpipe/python-dbsync-starter-kit.git&template=python&size=small)

Delete a Workspace

To delete a workspace you need to select it from the list by clicking on the button on the right.


Inside the Workspace detail, you have the option to Delete your Workspace.


⚠️

Deleting a Workspace will remove all of its associated information. This operation can not be undone.

Explore more about what you can do with Workspaces in our Extensions section.

Access resources from your Workspace

From inside your Workspace, you can access all the resources available in Demeter (opens in a new tab), i.e.: Cardano Node, DB-Sync, Ogmios, Kupo, Webhooks, etc. All pre-configured environment variables will be available according to the enabled extensions.

Working and making changes

Can I push my changes back to the git repository?

Yes, but you'll need to specify your git authentication credentials manually. By default, your workspace has the git remote origin pointing to the repository specified during creation. By running "git push origin", the git client will ask you for the corresponding credentials. The credentials to be used depend on the particular provider.

Do I lose my files when a Workspace restarts?

Most of your system personalizations. Anything outside the $HOME directory will NOT be persisted and effectively lost after your Workspace is paused.

DCUs and Resources Consumption

Demeter Compute Units (DCUs) are an abstraction layer implemented in Demeter (opens in a new tab) to measure infrastructure usage. Having a workspace running consumes several resources. To optimize resource consumption, make sure you always pause your workspace after completing your work.

For pausing a Workspace, you can select the pause button from the Workspace detail screen.


workspaces list

For the Workspaces paused, there is still a minimal amount of resources consumed per unit of time, given that all of your configuration and changes are persisted in the cloud. If you don't need a Workspace anymore, make sure you delete it from the list. For deleting a Workspace you can go to the bottom of the screen and press the Delete button.


workspaces detail

What happens if I leave my Workspace running?

Workspaces that are inactive after 30 minutes will be paused automatically. Regardless of the automatic pause, we recommend manually pausing your workspace right after you finish working to avoid wasting valuable resources.