diff --git a/content/2.developers/6.resources/2.decentralized-computing.md b/content/2.developers/6.resources/2.decentralized-computing.md new file mode 100644 index 00000000..60314155 --- /dev/null +++ b/content/2.developers/6.resources/2.decentralized-computing.md @@ -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 “your_email@example.com”. +``` +:: + + +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. diff --git a/public/images/docs/cudos/CUDOS_10_name.png b/public/images/docs/cudos/CUDOS_10_name.png new file mode 100644 index 00000000..8cb2959d Binary files /dev/null and b/public/images/docs/cudos/CUDOS_10_name.png differ diff --git a/public/images/docs/cudos/CUDOS_11_confirm.png b/public/images/docs/cudos/CUDOS_11_confirm.png new file mode 100644 index 00000000..dadc50a6 Binary files /dev/null and b/public/images/docs/cudos/CUDOS_11_confirm.png differ diff --git a/public/images/docs/cudos/CUDOS_12_my_vms.png b/public/images/docs/cudos/CUDOS_12_my_vms.png new file mode 100644 index 00000000..0ed8d9ae Binary files /dev/null and b/public/images/docs/cudos/CUDOS_12_my_vms.png differ diff --git a/public/images/docs/cudos/CUDOS_13_machine_details.png b/public/images/docs/cudos/CUDOS_13_machine_details.png new file mode 100644 index 00000000..06c2f84e Binary files /dev/null and b/public/images/docs/cudos/CUDOS_13_machine_details.png differ diff --git a/public/images/docs/cudos/CUDOS_1_intro.png b/public/images/docs/cudos/CUDOS_1_intro.png new file mode 100644 index 00000000..3afd7edc Binary files /dev/null and b/public/images/docs/cudos/CUDOS_1_intro.png differ diff --git a/public/images/docs/cudos/CUDOS_2_login.png b/public/images/docs/cudos/CUDOS_2_login.png new file mode 100644 index 00000000..6ed66371 Binary files /dev/null and b/public/images/docs/cudos/CUDOS_2_login.png differ diff --git a/public/images/docs/cudos/CUDOS_3_vms.png b/public/images/docs/cudos/CUDOS_3_vms.png new file mode 100644 index 00000000..13968287 Binary files /dev/null and b/public/images/docs/cudos/CUDOS_3_vms.png differ diff --git a/public/images/docs/cudos/CUDOS_4_payment.png b/public/images/docs/cudos/CUDOS_4_payment.png new file mode 100644 index 00000000..d3863d8e Binary files /dev/null and b/public/images/docs/cudos/CUDOS_4_payment.png differ diff --git a/public/images/docs/cudos/CUDOS_5_payment_processing.png b/public/images/docs/cudos/CUDOS_5_payment_processing.png new file mode 100644 index 00000000..4426a73c Binary files /dev/null and b/public/images/docs/cudos/CUDOS_5_payment_processing.png differ diff --git a/public/images/docs/cudos/CUDOS_6_os.png b/public/images/docs/cudos/CUDOS_6_os.png new file mode 100644 index 00000000..3f0f9b60 Binary files /dev/null and b/public/images/docs/cudos/CUDOS_6_os.png differ diff --git a/public/images/docs/cudos/CUDOS_7_specs.png b/public/images/docs/cudos/CUDOS_7_specs.png new file mode 100644 index 00000000..d528333c Binary files /dev/null and b/public/images/docs/cudos/CUDOS_7_specs.png differ diff --git a/public/images/docs/cudos/CUDOS_8_summary.png b/public/images/docs/cudos/CUDOS_8_summary.png new file mode 100644 index 00000000..45caa2b1 Binary files /dev/null and b/public/images/docs/cudos/CUDOS_8_summary.png differ diff --git a/public/images/docs/cudos/CUDOS_9_ssh.png b/public/images/docs/cudos/CUDOS_9_ssh.png new file mode 100644 index 00000000..4c2b7d80 Binary files /dev/null and b/public/images/docs/cudos/CUDOS_9_ssh.png differ