Skip to content

Commit

Permalink
added_decentralized_computing_page (#455)
Browse files Browse the repository at this point in the history
Co-authored-by: lufa23 <[email protected]>
Co-authored-by: Adrian Thompson <[email protected]>
  • Loading branch information
3 people authored Mar 4, 2024
1 parent f44e19d commit 2eb0a0e
Show file tree
Hide file tree
Showing 14 changed files with 196 additions and 0 deletions.
196 changes: 196 additions & 0 deletions content/2.developers/6.resources/2.decentralized-computing.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,196 @@
---
objectID: developers_resources-decentralized_computing
title: Decentralized Computing
description: A tutorial on how to use decentralized computing when building dApps.
parentSection: Developers
parentSectionPath: /developers
---


# Decentralized Computing

Decentralized computing is an important piece for the resilience of Web3 applications, being part of Decentralized Phisical Infrastructure (DePIN).

As many dApps only rely on smart-contract logic, they can guarantee their decentralization as all their code is run on-chain. However when it comes to off-chain logic, Front Ends and other components, dApps are usually run on centralized cloud providers. This is unfortunate, as the excessive reliance on centralized cloud providers can highly affect the decentralization of dApps, making them susceptible to single points of failure and censorship.

Developers may choose a centralized cloud provider instead of a decentralized one because of their perceived reliability and ease of use. However, there have been important steps forward towards the decentralization of cloud computing, and on this page we cover one of the leading solutions.


## CUDOS Intercloud

[CUDOS Intercloud](https://intercloud.cudos.org/) is a distributed network of data center infrastructure around the world, which can be accessed within a Web3 framework. CUDOS allows developers and validators to easily spin up Virtual Machines and servers by only having a Web3 wallet (e.g. Keplr, Metamask..).

This is an important help to Validators, DAOs, and DApps, because of the following reasons:

1) Validators gain crypto for their validating operations but have usually costs to be paid in fiat currency to their cloud providers. This introduces friction in the process, as Validators need to convert the recently gained crypto into fiat, by using an exchange and paying high fees.

2) Validators are required to perform two separate KYCs to get the services from two different organizations:
KYC for cloud infrastructure providers (e.g. AWS, Google Cloud.. )
KYC for exchange (to easily switch the staking rewards into fiat via high-liquidity and efficient markets)

3) DApps that highly rely on centralized cloud providers are susceptible of centralization, compared to using a differentiated set of providers via a cloud computing marketplace.

4) Using centralized cloud services such as AWS makes validators incur higher operational costs.



CUDOS leverages a distributed network of high-reliability infrastructure providers, allowing Web3 natives to use their service by only having a crypto wallet

## How to deploy a dApp on CUDOS

### Accessing CUDOS Intercloud

Visit the CUDOS Intercloud website at https://intercloud.cudos.org/.

![](/images/docs/cudos/CUDOS_1_intro.png)

To log in, click the **Log In** button at the top right. A pop-up box will prompt you to select your wallet provider and connect your wallet to the platform.

You will then get another pop-up prompting you to approve the login through your wallet which you can then approve to login.

After logging in, you’ll be directed to a page that provides an overview of your account with a prompt for a credit top-up. You also can see the options to create a machine, your identities which are the wallets that you’ve connected, your payment history, and your current balance.

![](/images/docs/cudos/CUDOS_2_login.png)


### Funding the account

By clicking on **Top-up before making this machine** from the main page of going to payments you can fund your account. Payments in native **$ARCH** will soon be accepted too.

![](/images/docs/cudos/CUDOS_3_vms.png)


As an example, you can select $10 USD worth of **$CUDOS**, press **Pay** and then sign the transaction on your wallet.

![](/images/docs/cudos/CUDOS_4_payment.png)
![](/images/docs/cudos/CUDOS_5_payment_processing.png)

Adding funds ensures you have the necessary credits to launch and manage VMs.

### Launching a Virtual Machine (VM)
#### Choosing the Operating System


When launching a VM, you can choose from a range of available operating systems and their versions.
![](/images/docs/cudos/CUDOS_6_os.png)


#### Selecting Server Location and Specifications

You can choose your preferred server location and VM specifications based on your project requirements.

You can use the sliders to filter between the options for vCPUs, vGPUs, RAM, and storage. Additionally, you can see the pricing per hour listing in the last column.

![](/images/docs/cudos/CUDOS_7_specs.png)


#### Costs

You can see your chosen configurations and the cost per day, month, and year on the right-hand sidebar.
The transparent pricing model ensures you are always aware of the costs associated with your VM.


### Setting Up SSH Keys

You can ensure the security of your VM by setting up SSH keys for encrypted access, by pasting your public SSH key.

![](/images/docs/cudos/CUDOS_9_ssh.png)

If you don’t know your SSH key, you can follow these steps:

1) Check for Existing SSH Keys
Open the terminal and enter:

::tab-card{noOfTabs=3}
#title0
Linux

#desc0
::highlight-card

```bash
ls ~/.ssh/ | grep pub
```

::

#title1
MacOS

#desc1
::highlight-card

```bash
cd %userprofile%\.ssh
ls -al

```

::


#title2
Windows

#desc2
::highlight-card

```bash
cd %userprofile%\.ssh
Dir
```
::

::




to see if existing SSH keys are present on your OS.

If you have any results, it means that SSH keys already exist. This implies that you can skip the next step.

2) Generate a New SSH Key Pair

If no keys exist or you want a new one, enter:

::highlight-card

```bash
ssh-keygen -t ed25519 -C “[email protected]”.
```
::


You can then follow the prompts to choose where to save the key.

#### Managing, Modifying and Monitoring VMs

You can assign a name to your VM and explore the various management options available. If you do not assign a name yourself, the VM will have a randomly generated name.

![](/images/docs/cudos/CUDOS_10_name.png)

You can add the amount of tokens you want based on the amount of hours or days you’d like to have the VM to run. When you are ready to deploy and have enough funds to run your VM, press **Confirm & Deploy** underneath the name section or at the bottom of the right-hand sidebar.


Before deploying, double check the summary to make sure everything is correct:

![](/images/docs/cudos/CUDOS_8_summary.png)


In the **My Machines** section, you can stop, restart, and delete VMs. Keep in mind that VMs will stop independently if they run out of money or if you stop them manually.

![](/images/docs/cudos/CUDOS_12_my_vms.png)


By clicking on the name of the virtual machine highlighted with a blue font colour, you can also check the current state of the VM.

![](/images/docs/cudos/CUDOS_13_machine_details.png)

Note: If you destroy your VM, it will display as finished and remain on your list with its associated metadata. If you click destroy a second time, it will be fully removed from the list and all associated metadata will be deleted as well.



### Conclusion

You can make sure that your dApps built on Archway are fully decentralized in their components by using CUDOS. The process of deployment of Archway dApps on decentralized computing infrastructure is about to become even easier, thanks to the upcoming integration between Archway and CUDOS that will allow you to deploy an [Archway Multisig](https://docs.archway.io/developers/guides/multisig/archway-multisig-hub) instance on the [CUDOS Intercloud](https://intercloud.cudos.org/) with just few clicks.
Binary file added public/images/docs/cudos/CUDOS_10_name.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/images/docs/cudos/CUDOS_11_confirm.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/images/docs/cudos/CUDOS_12_my_vms.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/images/docs/cudos/CUDOS_1_intro.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/images/docs/cudos/CUDOS_2_login.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/images/docs/cudos/CUDOS_3_vms.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/images/docs/cudos/CUDOS_4_payment.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/images/docs/cudos/CUDOS_6_os.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/images/docs/cudos/CUDOS_7_specs.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/images/docs/cudos/CUDOS_8_summary.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/images/docs/cudos/CUDOS_9_ssh.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 2eb0a0e

Please sign in to comment.