-
Notifications
You must be signed in to change notification settings - Fork 28
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
HL-1205 Postgres support #80
base: master
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -104,6 +104,7 @@ Resources: | |
SecurityGroupIds: | ||
- Ref: SshSecurityGroup | ||
- Ref: MySqlSecurityGroup | ||
- Ref: PostgresSecurityGroup | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It's a bit shoehorned, but shouldn't have negative consequences AFAIK |
||
KeyName: | ||
Ref: KeyName | ||
ImageId: !Ref Ami | ||
|
@@ -183,6 +184,17 @@ Resources: | |
FromPort: 3306 | ||
ToPort: 3306 | ||
CidrIp: 0.0.0.0/0 | ||
PostgresSecurityGroup: | ||
Type: AWS::EC2::SecurityGroup | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The mini-disadvantage is that it will allocate two Security Groups even tho only one is used. It's an AWS resource, so it'll cost a little and might increase CloudFormation provisioning time. OTOH SecurityGroups are relatively cheap, so I guess we're fine here. Just FYI. |
||
Properties: | ||
VpcId: | ||
Ref: Vpc | ||
GroupDescription: Enables Postgres access | ||
SecurityGroupIngress: | ||
- IpProtocol: tcp | ||
FromPort: 5432 | ||
ToPort: 5432 | ||
CidrIp: 0.0.0.0/0 | ||
SubnetSecurityGroup: | ||
Type: AWS::EC2::SecurityGroup | ||
Properties: | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
|
||
<jira-database-config> | ||
<name>defaultDS</name> | ||
<delegator-name>default</delegator-name> | ||
<database-type>postgres72</database-type> | ||
<schema-name>public</schema-name> | ||
<jdbc-datasource> | ||
<url>jdbc:postgresql://localhost:3306/jira</url> | ||
<driver-class>org.postgresql.Driver</driver-class> | ||
<username>jira</username> | ||
<password>jira</password> | ||
<pool-min-size>20</pool-min-size> | ||
<pool-max-size>20</pool-max-size> | ||
<pool-max-wait>30000</pool-max-wait> | ||
<validation-query>select 1</validation-query> | ||
<min-evictable-idle-time-millis>60000</min-evictable-idle-time-millis> | ||
<time-between-eviction-runs-millis>300000</time-between-eviction-runs-millis> | ||
<pool-max-idle>20</pool-max-idle> | ||
<pool-remove-abandoned>true</pool-remove-abandoned> | ||
<pool-remove-abandoned-timeout>300</pool-remove-abandoned-timeout> | ||
<pool-test-on-borrow>false</pool-test-on-borrow> | ||
<pool-test-while-idle>true</pool-test-while-idle> | ||
</jdbc-datasource> | ||
</jira-database-config> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It nicely explains the current tribal knowledge: the MySQL datasets have predefined
dbconfig.xml
👍