- Environment: AWS EC2
- Date Nov 12 2022
- Server Config
Ubuntu Server 22.04 LTS (HVM), SSD Volume Type
Architecture 64-bit (x86)
t3.large
Family: t3 2 vCPU 8GiB Memory
On-Demand Linux pricing: 0.0832 USD per Hour
On-Demand Windows pricing: 0.1108USD per Hour
Volume 1 (AMI Root) (Custom) 50 GiB gp2
Create SSH key
Note: This is the minimum server config, otherwise the nix-shell session might be
Killed
in either entering thenix-shell
or doingcabal repl
.
-
Enter into VM
-
Add user, make it
sudo
, change user to newly created one
sudo adduser sidan
- after typing this command following prompts would up
- passward
- repeat password
- Full name
- Room number
- Work phone
- Home phone
- Other
- Is the info correct
sudo gpasswd -a sidan sudo
su sidan
- have to type password here
Setup guide taking reference to plutus community doc
- Update the package and install
curl
sudo sh -c 'apt update && apt install curl'
- Install
git
sudo apt-get install git
- Install
nix
sh <(curl -L https://nixos.org/nix/install) --no-daemon
- Set the environment
. /home/sidan/.nix-profile/etc/profile.d/nix.sh
- Adding IOHK caches
mkdir -p ~/.config/nix
echo 'substituters = https://hydra.iohk.io https://iohk.cachix.org https://cache.nixos.org/' >> ~/.config/nix/nix.conf
sudo echo 'trusted-public-keys = hydra.iohk.io:f/Ea+s+dFdN+3Y/G+FDgSq+a5NEWhJGzdjvKNGv0/EQ= iohk.cachix.org-1:DpRUyj7h7V830dp/i6Nti+NEO2/nhblbov/8MW7Rqoo= cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY=' >> ~/.config/nix/nix.conf
sudo echo 'extra-experimental-features = flakes' >> ~/.config/nix/nix.conf
- Create a separate directory
mkdir ~/validator-endpoint
- Clone the
plutus-apps
cd ~/validator-endpoint/
git clone https://github.com/input-output-hk/plutus-apps.git
- Clone the Cardano project, here we assume it is open source
git clone https://github.com/SIDANWhatever/plutus-cborhex-automation.git
- Prior to anything started, logout the terminal, and login directly as the user where the nix-shell is installed
exit
exit
exit
cd ~/.ssh
ssh -i "testbuild.pem" sidan@ec2-xx-xxx-xx-xxx.us-west-2.compute.amazonaws.com
- Entering nix-shell with IOHK binaries, here we checkout the
next-node
tag97b4c1da03faf9bc35f348802fb7927231657e75
cd ~/validator-endpoint/plutus-apps
git checkout 97b4c1da03faf9bc35f348802fb7927231657e75
nix-shell
- Update Cabal
cabal update
- Start the
example
backend
cd ~/plutus-cborhex-automation/example
cabal run sidan-plutus-server