Skip to content

macduff23/akash-ubuntu

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Setup an "ssh" ubuntu image on Akash

Optional : build custom Docker image (recommended)

Update Dockerfile with your needs.

# Note you can also use the prebuilt image at user994455/ubuntu-base:0.2
$ docker build -t $your_dockerhub_user/ubuntu-base:0.2 .

Update deploy.yml with your newly built docker image. ( or keep the prebuilt image)

Prepare your ssh session

On your workstation setup an ssh public/private key pair.

$ssh-keygen -t rsa
# (a password is optional. But in most cases you don't need one).
# Note that $HOME/.ssh/id_rsa.pub is now created

Update deploy.yml

Copy and paste the contents of $HOME/.ssh/id_rsa.pub and paste them into deploy.yml (env -> pubkey). (deploy.yml : line 8). NOTE: Make sure that you do not use any " around the pubkey as this will cause problems.

Update resources as needed. Set the amount of RAM / CPU / diskspace as needed.

Deploy to Akash

Create an akash address

make address
echo "export AKASH_ADDRESS=**address** " >> env.sh

** Fund AKASH_ADDRESS with at least 5 AKT ** create a deployment (you can use deploy.yml) as an example

# Need to do this once
make create_certificate
make create_deployment
make list_bid

accept a bid

make create_lease PROVIDER=**provider** DSEQ=**dseq**

push the manifest

make send_manifest PROVIDER=**provider** DSEQ=**dseq**

Read logs

make lease_logs PROVIDER=**provider** DSEQ=**dseq**

Most importantly -- how do you interact with this?

make lease_status PROVIDER=**provider** DSEQ=**dseq**

Take a note of the URL and exposed random port. That is your ssh port to access.

ssh -p $RANDOMPORT root@URL

Debug

If things are still not working you can set "debug=true" in the environment variable section of deploy.yml. This will cause sshd to run with debug mode to get additional info. As a side effect as soon as you close your session it will kill the SSH session.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Shell 57.1%
  • Dockerfile 42.9%