Giter VIP home page Giter VIP logo

foldingonazure's Introduction

Folding@Azure

My Folding Journey

I discovered Folding@Home from the following blog while I was sat at my Mother's one Sunday afternoon after helping with the shopping. My Mother having Asthma & COPD, my Father with diabetes and my Step-Father who suffered a bad stroke late last year all fall within the high-risk category. I decided to do my part and see if I could get this up and running on my home PC. Five minutes later I was connected and my PC was completing a folding project on to helping to find therapeutic opportunities for COVID-19. You can repeat this with any machine you have at home by going to Folding@Home.

I then thought how could I take this one step further and combine this with my other work expertise. I set out on the following Saturday afternoon to see if I could get a repeatable deployment running on Azure. Using my Azure MSDN subscription I believe this is the first terraform based deployment. This deployment doesn't require you to login and setup the Azure VM that is completed for you. All that is required is a few code edits and a terraform apply and that's it your up and running. I admit I am not the first to do this and there are some other fantastic github projects as well.

Setup

Terraform to setup Folding@Home instances in Azure.

Prerequisites

  1. An Azure account. I used an MSDN subscription for this. With the Azure Free Subscription you will have £150 credits that will allow you to running a Standard F4s_v2 VMs for 24x7 for one month.
  2. A Service Principal with Contributor rights over your Azure Subscription.
  3. Install Terraform.
  4. Install Git.

Getting Started

  1. Clone the repo to your machine.
  2. Edit the terraform.tfvars file.
  3. Edit the cloud-init.yaml file to configure the folding at home client.
  4. Run terraform init
  5. Run terraform apply
  6. Terraform will output the hostname for the folding VMs in Azure. These can be accessed at http://hostname:7396

Edit the terraform.tfvars file

Open the file with your editor of choice (VS Code recommended) Fill in your values in between the quotations.

  1. tenant_id: Your Azure Tenant ID
  2. subscription_id: Your Azure Subscription ID
  3. client_id: Your Service Principal Client ID
  4. client_secret: Your Service Principal Secret
  5. location: Azure Region to deploy to. I chose West Europe
  6. clientip: Your Public IP you will be viewing your folding from
  7. fahvmusername: Username used to login to the linux VM
  8. fahvmpassword: Password used to login to the linux VM

Updating the cloud-init.yaml

  1. User: This can be any unique identifier that you want to use to track your work contribution. Read more about users.
  2. Team: The team that you want to associate your work with. My Team is 248825. Read more about teams.
  3. Passkey: A unique identifier that ties your contributions directly to you (not just those with your username). Read more about passkeys.
  4. Allow: Replace x.x.x.x with your public IP to be able to view your host with a web browser. To find out what your public IP is use this handy little website.
  5. Web-Allow: Replace x.x.x.x with your public IP to be able to view your host with a web browser.
  6. Password: Set A Password to remotely manage the FAHClient with FAHControl. Download from here.

Advanced Options

There are several more advanced options that can be changed, there are as follows.

In the terraform.tfvars file add the lines

  1. fahvmcount: Then set to the number of VMs you would like to build e.g. 3
  2. fahvmname: To change the Prefix of the Virtual Machine name.
  3. fahvmsize: If you would like to change the VM size from the default Standard_F4s_v2 e.g Standard_D2s_v2. I would not recommend the B-series VMs.
  4. fahvmgpuenabled: Set this value to true if using an Nvidia based VM such as Standard_NC12s_v3. Currently the NVv4 series will fail to deploy as it is an AMD based GPU.

In the cloud-init-yaml file

  1. GPU: Set value to true if using an Nvidia based Azure VM. Recommended SKU is the NCv3-series. Currently the NVv4 series will fail to deploy as it is an AMD based GPU.

foldingonazure's People

Contributors

rylwil1993 avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.