Workspace

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 toolchains 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.

Go to your project and in the Resources page, select the Add resource button. Then, click on the Deploy button inside the Workspace card. 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, add resources 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 a considerable amount of DCUs. Always keep only the Workspaces you need to optimize your consumption. To learn more about the DCUs 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: 2 Gi - disk: 10 Gi
mediumcpu: 2 - mem: 4 Gi - disk: 10 Gi
largecpu: 4 - mem: 8 Gi - disk: 10 Gi

Git Author

Sets the git global configuration user.name

Git email

Sets the git global configuration user.email

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, just click on the Delete button from the Workspace detail screen.

⚠️

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

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 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, by clicking the pause button from the Workspace detail screen.

For the Workspaces paused, there is still a minimal amount of DCUs 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.

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.