Tag Archives: [email protected]

Folding@Home Header

Deploying the VMware Appliance for [email protected] using Terraform

To simplify the deployment of [email protected] appliances to vSphere environments, I have wrote a set of Terraform configuration files (script).

You will need two packages downloaded to your jump host.

And either download locally the VMware [email protected] Appliance, or host it at remote location.

Use the git software to download my Terraform Git folder which contains the folder called Deploy-FAH.

git clone https://github.com/saintdle/Terraform.git

Move into the “Deploy-FAH” folder, and edit the terraform.tfvars file as needed;

cd Deploy-FAH
vi terraform.tfvars

Below is an example;

// Name of the vSphere server. E.g "vcsa.vmware.local"
vsphere_server = "vcenter.veducate.local"

// User on the vSphere server. E.g "administrator@vsphere.local"
vsphere_user = "administrator@vsphere.local"

// Password of the user on the vSphere server. E.g "password"
vsphere_password = "Password1234!"

// Name of the vSphere data center. E.g "datacenter"
vsphere_datacenter = "Datacenter"

// Name of the vSphere cluster. E.g "Cluster"
vsphere_cluster = "Cluster"

// Name or IP of the vSphere host in the cluster to deploy your VM to. E.g "esxi-01" or "192.168.1.20"
vsphere_host = "10.10.2.4"

// Name of the vSphere data store to use for the VMs. E.g "VSAN"
vsphere_datastore = "Datastore"

// Network to connect virtual machine
vm_network = "Freale_NW1"

// Number of instances to deploy
instance_count = 2

// VM Machine Name (an index will be appended i.e FAH-1, FAH-2,)
vm_name = "dean-test"

// Number of CPUs to set on deployed Virtual Machines
num_cpu = 2

// Memory to set on deployed Virtual Machines (in MB)
memory = 4096

// Name of vSphere Resouce Pool to be created. E.g "FAH-VMs"
vsphere_resource_pool = "dean-test"

// Name of VM folder to be created. E.g "FAH-VMs"
vsphere_vm_folder = "dean-test"

// Location of OVA file if using a local location - if using remote location, leave this as null
local_ovf_path = "/home/dean/Deploy-FAH-3/VMware-Appliance-FaH_1.0.4.ova"

// Location of OVA file if using a remote location - if using local location, leave this as null
remote_ovf_path =

// Enable SSH in FAH Appliance (True or False)
ssh_enable = "True"

// FAH appliance root password
root_password = "VMware1!"

// FAH Username you wish to be associated with in the statistics tables
fah_user = ""

// FAH Team you wish to be associated with in the statistics tables
fah_team = "52737"

// FAH Passkey to verify your user in the statistical tables (this is optional from FAH project)
fah_passkey = "unique_id"

That’s it, no more changes needed, it’s as simple as running the following to deploy your appliances;

#This will download the terraform providers as needed

terraform init

#This will show you the planned changes and make sure they are possible

terraform plan

#This will run the configuration to run the deployment

terraform apply

You can use the latest version of Terraform, version 0.13.5 as of the publishing of this post.

Quick notes

This terraform configuration uses some advance configuration in the folder “FAH-Appliance”, under the main.tf file. Here it reads the “remote_ovf_path” variable, and acts based on if it is null or not. If there is a variable set, then it runs the command to deploy from a remote location. If variable is null, then it looks to the “local_ovf_path”, and processes this to deploy an OVF/OVA from the local location.

  dynamic "ovf_deploy" {
  for_each = "${var.local_ovf_path}" != "" || "${var.remote_ovf_path}" != "" ? [0] : []
  content {
  // Path to local or remote ovf/ova file
  local_ovf_path = "${var.local_ovf_path}" != "" ? "${var.local_ovf_path}" : null
  remote_ovf_url = "${var.remote_ovf_path}" != "" ? "${var.remote_ovf_path}" : null
   disk_provisioning    = "thin"
   ovf_network_map = {
        "VM Network" = data.vsphere_network.network.id
    }
   }
  }

Thanks to Grant Orchard from HashiCorp helping me with this part of the config.

Interesting in where you can take this further, check out this post from Robert Jenson, using VMware CodeStream for an Infrastructure as Code deployment using GitHub as a source repository, and terraform for the deployment.

Regards

Folding@Home Header

How to deploy the VMware Appliance for [email protected]

In this blog post we will go through the steps to deploy the VMware Appliance for [email protected] to;

  • vCenter
  • Standalone ESXi host
  • VMware Fusion/Workstation

And also cover some basic troubleshooting.

Getting started with the VMware [email protected] Appliance (vBrownBag Recording)

Deploy the VMware Appliance for [email protected] to vCenter

Continue reading How to deploy the VMware Appliance for [email protected]

Folding@Home Header

How to use FAHControl to manage multiple [email protected] Client instances

This blog post will cover managing a number of [email protected] Clients using FAHControl.

If you are using the VMware [email protected] Fling, then this appliance will be configured for remote control on deployment.

This blog is based on [email protected] deployed on Linux, but the same applied for Windows.

Installing FAHControl to monitor multiple installations 

For Windows instances, this is installed as part of the FAHClient 

  • “C:\Program Files (x86)\FAHClient\FAHControl.exe

For Linux, you will need to install FAHControl separately 

For Mac OS X Instances, this is installed as part of the FAHClient 

Configuring your FAHClient for remote access  

On your deployed OVAs 

  1. Connect via SSH 
  2. Edit the config.xml file 
  3. vi /etc/fahclient/config.xml 
  4. Insert the following code to enable FAHControl access 
  5. From within vi press ‘i 
  6. To configure a single address to access your client 
  7. Without passwords; 
<command-allow-no-pass v='127.0.0.1 x.x.x.x’ /> 
  1. With Password; 
<command-allow v='127.0.0.1 192.168.200.10' /> 

<password v='VMware1!' /> 

N.B. The localhost address must remain configured, otherwise the client work run 

Examples: 

Using password with a single IP restriction 

  <!-- Remote Command Server --> 

  <command-allow v='127.0.0.1 192.168.200.10' /> 

  <password v='VMware1!'/> 

Without a password against a single IP restriction 

  <!-- Remote Command Server --> 

  <command-allow-no-pass v='127.0.0.1 192.168.200.10' /> 

Without either a password or IP restriction 

<!-- Remote Command Server --> 

  <command-allow-no-pass v='127.0.0.1 0.0.0.0/0' /> 
  1. Save the config.xml file 
  1. Press ESC key 
  1. Enter without quotes “:wq!”
  1. Reload the FAHClient 
  1. /etc/init.d/FAHClient restart

If you see “Starting fahclient … FAIL” check your XML file again for any syntax errors.  

Connecting FAHControl to your clients 

  1. Open your FAHControl and click Add
  2. Enter the name of your client as you would like it to be displayed, the IP address of your client and your password if necessary, and click save.
  3. You should now see your client is connected in FAHControl. 

Appendix 

Firewall rules 

If you are using iptables, the below firewall rules will need to be configured for Linux allow for FAHControl to remotely manage FAHClient.

iptables -A INPUT -p tcp --dport 36330 -m conntrack --ctstate NEW,ESTABLISHED -j ACCEPT 

iptables -A OUTPUT-p tcp --dport 36330 -m conntrack --ctstate NEW,ESTABLISHED -j ACCEPT 

Regards

Joining VMware and the [email protected] Project – FAQ

Since my first post about joining the VMware Team in the [email protected] ([email protected]) project, a lot has happened, we have created an easily to deploy and use OVA via our Flings website, which once deployed, will connect to the [email protected] project and start contributing straight away.

I’ve been humbled to be part of this internal VMware project and provide some of the documentation for the Fling..

In this post I will cover a FAQ of the typical questions we have come across. A FAQ can also be found on the fling web page.

VMware Appliance for Folding FAQ

1. Where can I learn more about the [email protected] project?

I recommend you check out the [email protected] website

2. If I have no VMware software, can I still contribute?

Yes, the OVA Fling is designed for deployment on VMware Workstation, Fusion and vSphere products.

However you can simply run the [email protected] client locally on your workstation, laptop or home micro server. VMware Software is not needed!

3. I seem to be receiving no workloads, is my OVA working?

If you can see logs stating the below, this means there are no available work units for your appliance configuration. We recommend leaving your appliance running, and it will continue to search for available work units.

16:24:39:WU00:FS00:Connecting to 65.254.110.245:8080

16:24:40:WARNING:WU00:FS00:Failed to get assignment from '65.254.110.245:8080': No WUs available for this configuration

4. My appliance seems to not be working, and I see “vghetto-photonos login:” when I open the console for my appliance.

You need to deploy the appliance with the OS Root Password configuration, this is a mandatory parameter, as there is no default root password for PhotonOS builds.

5. Why cannot I not select to just work on COVID-19 projects?

This is not an option that’s available from the [email protected] team, however any work units for COVID-19 will be prioritised. These are the Covid-19 projects:

  • CPU : 14328 – 14329 – 14530 – 14531
  • GPU : 11741 to 11764

6. How many CPUs should I configure my OVA with?

This depends on your available resources, by default the appliance will deploy with 2 CPUs.

7. Are there any other optimizations I can make with my configuration?

You can consult the previous link for advanced client settings. We also recommend authenticating your work by using a PassKey, please see this link; https://foldingathome.org/support/faq/points/passkey/.

8. Can I deploy the OVA on a ESXi host?

Yes, however you will need to use the OVFTool, the Host Client UI is not supported. You can find sample scripts here; https://github.com/lamw/vmware-fah-automation

9. Can I deploy multiple OVAs at once?

Yes, you can reference the following automation options,

10. Can I deploy the OVA on Fusion or Workstation?

Yes, you can deploy our latest OVA (ver. 1.0.1 and higher) to both VMware Fusion and VMware Workstation.

11. What are my options for monitoring the appliance?

There are three options;

  • Within the VM console itself, you can choose between the PhotonOS shell (ALT + F1) and Top screen (ALT + F2).
  • Connecting the web client – https://OVA_IP:7396
  • Using FAHControl to connect to multiple clients. This is installed by default with the [email protected] client on Windows and Mac OS X and there is a separate installer for Linux machines.

12. Is there something cooler, like monitoring in vROPs?

You can monitor the VMware Team’s performance using this vROPs dashboard; https://github.com/johnddias/vROps-Folding-at-Home

13. What ports and IP addresses do I need to open on my firewall?

  • External (Internet)
    • Inbound/Outbound on port 8080 or 80 to receive and upload Workload Unit (Please see Folding @ Home Documentation for a complete list of servers for security whitelisting)
  • Internal
    • Inbound/Outbound on port 36330 for remote management of FAHClient using FAHControl Center
    • Inbound/Outbound on port 7396 for local web management of FAHClient using FAH Web Control(e.g. http://[FAH]:7396)

14. Can I change the configuration of my [email protected] client after it is deployed?

Yes, you edit the settings using either FAHControl, or by connecting to the appliance and editing “/etc/fahclient/config.xml”. You can find more information at this link: https://foldingathome.org/support/faq/installation-guides/configuration-guide/.

15. Can I use a GPU with my appliance?

Yes, please see the supplementary documentation on the Fling website. Please also review the [email protected] requirements; https://foldingathome.org/support/faq/installation-guides/linux/requirements/.

16. if your GPU isn’t detected on your windows box

This fix has worked for other;

  • Windows Updates often breaks OpenCL support when it updates the drivers automatically. To fix it, reinstall the drivers you downloaded from nVidia or AMD website.

16. Where can I check the VMware Team stats and my user stats?

Official [email protected] Searchable Stats page – Team VMware

Official [email protected] – Fast stats – Team VMware

We have found that sometimes the official [email protected] stats page gives the error “Bad gateway”, so we recommend the Extreme Overclockers Forum link below.

Our WaveFront team have created a public facing dashboard as well!

17. I see in the logs, “Exception: Failed reading core package header”

Check your firewall/proxy settings for web filtering/download file inspection. It may be needed to exclude your appliance from this feature.

Note: I have personally seen this as an issue with the Sophos UTM used for home setups.

Regards

Join VMware & the [email protected] project in the fight against COVID-19

I won’t give a long written speech about the crisis we all face today.

However I do encourage you to spend your spare CPU cycles from your devices, whether thats personal devices or home lab servers, or anything else you can run the software, to fight the virus.

You can do this anonymously, or join a team, The main thing is you join up to help!!!;

  • VMware – 52737
  • EUC Community – 239018

The setup is really simple,

  1. Download the [email protected] software
  2. Install the software
  3. Setup your [email protected] client
  4. Select “Setup an Identity”
  5. Choose your username, and set your team as “52737″ to join VMware.