(This is a reprint of the article I wrote on my blog)
@ hirosys-biz has published the procedure to automatically build an environment with CloudFormation. It also solves the "bad" part of this article, so be sure to check it out as well. The environment for participating in the analysis project of COVID-19 (SARS-CoV-2) was automatically constructed by CloudFormation
"Let's practice building an Amazon Web Services environment while contributing to the analysis of the new coronavirus." As a result, I came to the conclusion that "it worked normally, but I couldn't contribute much because of the lack of specifications in the free tier." Keep a record of your work.
Corona fashion is spicy. Isn't it possible to solve it sooner?
↓
An article on PC Watch that says "How to use" Folding @ home ", which contributes to corona analysis that can be started in 3 minutes even now" Find
↓
Immediately install it on your home laptop (with an older generation GPU). I've been running for about a week and have done about 25 tasks, but I still feel unsatisfactory.
↓
I can't raise the specs, so I want to increase the number of units in operation. But I only have one physical machine ...
↓
Yes, I had an AWS account. Let's use this. If you can do it in the free frame, can someone imitate it if you make it an article?
↓
Action.
I decided to build a VPC environment first and then set up an EC2 environment in it. Basically, work according to this blog article.
Only the security group has been changed as follows according to the purpose of use this time.
Create an EC2 environment on the VPC environment created in ①. This work also referred to this blog article.
This time I wanted to create an environment that can be created with a free usage frame, so the configuration is as follows
$ sudo vi /etc/ssh/sshd_config
###Add the following around 22 lines(Port number specified in ①)
Port 2****
###After saving
$ sudo service sshd reload
###New user creation(root privileges)
# useradd newuser
# passwd newuser
###SSH settings(root privileges)
# cd /home/newuser/
# mkdir .ssh
# chmod 700 .ssh
# chown newuser:newuser .ssh
###Send the public key here with SCP
# mv /home/ec2-user/id_rsa.pub .ssh/authorized_keys
# chmod 600 .ssh/authorized_keys
# chown newuser:newuser .ssh/authorized_keys
###Give permission to sudo
# usermod -aG wheel newuser
###In another window"newuser"Log in as. After that, operate on the screen on the new user side
$ sudo su -
###After confirming that you can become root, ec2-user deleted
# userdel ec2-user
This time, only the minimum required FAH Client
is introduced.
$ wget https://download.foldingathome.org/releases/public/release/fahclient/centos-6.7-64bit/v7.6/fahclient-7.6.9-1.x86_64.rpm
$ sudo rpm -i --nodeps fahclient-7.6.9-1.x86_64.rpm
/etc/fahclient/config.xml
. Root privilege is required for updating.<config>
<!-- Client Control -->
<fold-anon v='true'/>
<!-- Folding Slot Configuration -->
<!-- v7.6.9-COVID for cause after 1-If you specify 19, corona related tasks will be assigned preferentially.-->
<cause v='COVID_19'/>
<gpu v='false'/>
<!--Access authority setting to the Web controller. xxx.xxx.xxx.Enter your IP address in place of xxx-->
<allow>127.0.0.1 xxx.xxx.xxx.xxx</allow>
<web-allow>127.0.0.1 xxx.xxx.xxx.xxx</web-allow>
<!--How much CPU resources do you use? light,middle,3 choices of full-->
<power v='full'/>
<!-- User Information -->
<!--User information. If you enter the user name, how much you contributed individually will be aggregated-->
<user v='deflat'/>
<!--The ID of the team you want to belong to. Optional. By the way, 222 is"Japan"team.-->
<team v='222'/>
<!--Optional. You can get more points by registering your e-mail address on the official website and setting the received key.-->
<passkey v='***Paste the key here***'/>
<!--Slot number and type. This time there is only one CPU so don't mess with it-->
<!-- Folding Slots -->
<slot id='0' type='CPU'/>
</config>
$ sudo /etc/init.d/FAHClient stop
$ sudo /etc/init.d/FAHClient start
http: // <IP address of EC2 environment>: 7396
with a web browser, you can see that it works properly as shown below. ... but ** insanely slow **Recommended Posts