Set up your dev env
This tutorial will guide you through setting up your development environment.
Install the oyster-cvm
CLI tool
The oyster-cvm
tool is available as a prebuilt binary for most platforms. Run
# for linux with amd64 architecture
sudo wget https://artifacts.marlin.org/oyster/binaries/oyster-cvm_latest_linux_amd64 -O /usr/local/bin/oyster-cvm
# for linux with arm64 architecture
sudo wget https://artifacts.marlin.org/oyster/binaries/oyster-cvm_latest_linux_arm64 -O /usr/local/bin/oyster-cvm
# for darwin with arm64 architecture (M series Macs)
sudo wget https://artifacts.marlin.org/oyster/binaries/oyster-cvm_latest_darwin_arm64 -O /usr/local/bin/oyster-cvm
To check the hardware architecture of your system on Linux, you can use either the arch
or uname -m
command, both return equivalent results. If the output is x86_64
(also known as AMD64), your system is running a 64-bit architecture based on the x86 instruction set, commonly used by Intel and AMD processors. If the output is aarch64
or arm64
, your system is using a 64-bit ARM architecture.
These two architectures (x86_64/AMD64
and ARM64/AArch64
) are fundamentally different and binary-incompatible, meaning that software compiled for one cannot run directly on the other without recompilation or emulation.
Make it executable by running
sudo chmod +x /usr/local/bin/oyster-cvm
You should now be able to run oyster-cvm
and see the help output by simply running
oyster-cvm
Set up a wallet
Oyster is a production-grade decentralized network with third party operators and hence requires payments in order to access services (similar to gas payments on a blockchain).
Set up an Ethereum wallet where you can export the private key. Deposit 0.001 ETH and 1 USDC to the wallet on the Arbitrum One network.
Set up a scratch directory
Set up an empty directory for running the commands in the tutorial:
mkdir scratch && cd scratch
And that's it! Now that you have set up a development environment, you are ready to start deploying on Oyster.
Oyster provides a simple Docker based deployment workflow out of the box. It lets you define services in a docker-compose file which can then be used for deployment. The CVM will download the Docker images specified in the docker-compose file at runtime and set up the enclave accordingly.
Read on to create a simple echo server that you can deploy.