Good morning. This is the Miyashita of infrastructure.
Redmine for the company is old, so I am considering replacing it.
I wanted to prepare a verification environment with as little effort as possible, so I used AWS cloudformation to
I tried to prepare redmine.
Table of Contents
Introduction
The redmine environment I am currently running is very old with a version of Redmine 1.1.2.stable (MySQL) on a physical server, so I would like to replace it in the end.
Create an Instance in CloudFormation
Open the Cloudformation screen from the Management Console.
Start creating a new one with "Create Stack".
・Name→ freely give it a name that is easy to manage.
- Select "Redmine Project Management System" from the SingleInstanceSamples in the Template→Use sample template.
*Since it is a verification environment, this time we will build it with a minimized configuration.
Go to the next step with "Next Step".
I put a value in Specify Parameters, but by default, I couldn't specify a key.
So I'll go back with "Back".
Save the following templates published by Amazon to your local PC.
https://s3.amazonaws.com/cloudformation-templates-us-east-1/Redmine\_Single\_Instance.template
The difference from the sample is that it only contains the KeyName definition, so if you don't SSH login,
This work is not necessary.
[shell](line 8) "KeyName": { "Description" : "Name of an existing EC2 KeyPair to enable SSH access to the instances", "Type": "String", "MinLength": "1", "MaxLength": "255", "AllowedPattern" : "[\\x20-\\x7E]*", "ConstraintDescription" : "can contain only ASCII characters." },
(line 230) "KeyName" : { "ref" : "KeyName" },[/shell]
Select the Upload template file for "Create A New Stack" again, select the saved template, and proceed to "Next Step".
A KeyName field will be added to Parameters, so enter the created key name.
- Feel free → DBRootPassword. Don't forget to use it later when logging in to mysql.
・InstanceType → default to m1.small, but change it to t1.micro - Specify the key→ which has already been created. If you haven't created one, make it first
- Specify the NW to allow SSH → SSH. You can change it later in the Securitypolicy
Go to the next step with "Next Step".
Options are not required, but if you want to make it easier to manage, I think it's a good idea to name the tag with a name
Advanced is also not needed this time. Set when you want to be notified when Autoscale.
Go to the next step with "Next Step".
If you have a final check in Review and there are no problems, the creation will start with "Create".
Configuration after the instance is launched
When the Stack Events are updated and it becomes CREATE_COMPLETE, check the EC2 side.
Since the specified type instance is running, first try accessing it in a browser.
http://ec2-54-xxx-xxx-xxx.ap-northeast-1.compute.amazonaws.com/
When the Redmine login page appears, try logging in as the default administrator.
ID:admin PASSWORD:admin
I was able to log in safely.
Now that we have started up, the HTTP port is actually open in ANY by default.
Since this time it is for the company, we will change the SecurityPolicy and impose IP address restrictions.
80 (HTTP) 0.0.0.0/0 →80 (HTTP) 202.202.202.xx/32
*If you want to keep ANY, I think it is better to change the admin password immediately.
Now you can easily create an instance.
I think you can make it from Bitnami's AMI on the Marketplace.
Since the OS is Ubuntu and I wanted to use Autoscale in the future, I built it with CloudFormation this time.
Next time, I will publish a record of migrating data from the Redmine 1.1.2 + MySQL 5.0 environment to Redmine 2.4.0 + MySQL 5.5.
○2014/4/8 Update
We have upgraded the version to prevent the openSSL vulnerability (Heartbleed).
[shell]# rpm -qa|grep openssl openssl-1.0.1e-4.55.amzn1.x86_64 openssl-1.0.1e-4.55.amzn1.i686 openssl-devel-1.0.1e-4.55.amzn1.x86_64[/shell] *HTTS communication is not available, Access is restricted, but it's disgusting.
Update to the version that has been addressed.
[shell]# yum update openssl Updated: audit.x86_64 0:2.3.2-3.19.amzn1 openssl.i686 1:1.0.1g-1.69.amzn1 openssl.x86_64 1:1.0.1g-1.69.amzn1
Dependency Updated: audit-libs.i686 0:2.3.2-3.19.amzn1 audit-libs.x86_64 0:2.3.2-3.19.amzn1 glibc.i686 0:2.17-36.81.amzn1 glibc.x86_64 0:2.17-36.81.amzn1 glibc-common.x86_64 0:2.17-36.81.amzn1 glibc-devel.x86_64 0:2.17-36.81.amzn1 glibc-headers.x86_64 0:2.17-36.81.amzn1 openssl-devel.x86_64 1:1.0.1g-1.69.amzn1
Complete! # rpm -q --changelog openssl * Wed Apr 09 2014 Cristian Gafton gafton@amazon.com - rebase to upstream v1.0.1g
* Mon Apr 07 2014 Ben Cressey bcressey@amazon.com - use dlopen with libssl for FIPS verification
* Mon Apr 07 2014 Cristian Gafton gafton@amazon.com - add fixes from upstream 1.0.1f/g releases (CVE-2014-0160, fixes for CVE-2013-0169)[/shell]
The update is now complete. However, all services that use the library
I have to restart.
[shell]# /etc/init.d/httpd restart[/shell] *By the way, the currently released amazon linux AMI is a version that has been prepared from the beginning.
It is said that it has become.
(It is better to check the version of other published AMIs each time after startup.)/gafton@amazon.com/bcressey@amazon.com/gafton@amazon.com