
Hello. It's been a long time. This is the developer's flat shape. All the engineers who visited this blog. And people other than engineers. Thank you very much. First of all, there is no code or command line in this article. The content I am sending this time can help you build and operate a truly scalable environment. ...

When I was writing a task in Capistrano3, I had a hard time obtaining the top-level task name because I had a hard time obtaining the top-level task name because I had a hard time subtracting the name of the top-level task executed as a cap command in the task. Basically, if you want to get your task name in a task in Capistrano3, you can draw it as an argument to the block as follows: ``` desc "main task" task...

When I ran a task in Capistrano3 by changing the stage environment, I fell into the symptom of the task being launched twice. Since the task is executed in duplicate, even if you set "two" AWS instances to be launched, "four" will occur, and the queries issued to MySQL will also be doubled, and the records to be INSERTED will be inserted in duplicates. The settings that were temporarily written to the file were also overwritten by the subsequent tasks that were started twice, and the dep...

So far, we have created a new AWS EC2 instance and made it a task in Capistrano 3 up to the initial configuration for that instance. Although it was difficult, we finally got to the point where the EC2 instance was ready and all we had to do was install the middleware and applications. Therefore, this time, I would like to summarize the deployment flow so far. ...

If you run a task to SSH access a newly created EC2 instance in Capistrano without fully upping it, the task will not complete with an error somewhere. Therefore, we created a task that checks the startup status of the EC2 instance to be deployed, and if it is not fully launched, it sleeps and waits for startup. ...

In this section, we will create tasks to initialize the server environment, such as creating a maintenance user, setting a password for the initial user, and setting the hostname of the server when logging in to a newly created EC2 instance in Capistrano for the first time via SSH. ...

Continuing from last time, let's SSH in to the newly created EC2 instance in Capistrano. First, AWS creates a key pair for the new instance. From the EC2 menu in the AWS Management Console, select Key...

The newly created EC2 instance in the previous deployment configuration file did not have a key pair, security group, etc., so I couldn't SSH access the created instance as it was... 1orz After that, I modified various deployment settings and was able to log in to the EC2 instance I created with SSH, so I wrote a memorandum about how it happened. ...

Last time, > Next time, I'm going to try to create a database and insert the initial settings as a last-minute task, then rewrite the WordPress configuration file and download the WordPress theme from GitHub. However, due to my convenience, I used Capistrano3 to create an AWS EC2 instance, so I would like to leave the TIPS. ...

I have used Capistrano3 to deploy the latest version of WordPress on my own host, so I will keep a log of the steps and advance my understanding of the deployment tool "Capistrano". ...