Skip to content

Commit 705190b

Browse files
committed
apb.yml, EULA, & async changes
1 parent e096426 commit 705190b

File tree

11 files changed

+182
-165
lines changed

11 files changed

+182
-165
lines changed

Dockerfile

+130-120
Large diffs are not rendered by default.

README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
1-
# MS SQL Server on Linux APB
1+
# Microsoft SQL Server on Linux APB
22

33
[![Build Status](https://travis-ci.org/ansibleplaybookbundle/mssql-apb.svg?branch=master)](https://travis-ci.org/ansibleplaybookbundle/mssql-apb)
44

55
## Description
66

77
![img](docs/img/sql-server.png)
88

9-
Deploy Microsoft SQL Server on Linux 2017 into your Openshift project via APB
9+
Deploy Microsoft SQL Server on Linux into your Openshift project via APB
1010

1111
## Plans
1212

apb.yml

+36-24
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
---
22
version: 1.0
33
name: mssql-apb
4-
description: APB to deploy Microsoft SQL Server on Linux 2017
4+
description: Deployment of Microsoft SQL Server on Linux
55
bindable: true
66
async: optional
77
metadata:
8-
displayName: MS SQL Server on Linux (APB)
8+
displayName: Microsoft SQL Server on Linux
99
imageUrl:
1010
https://raw.githubusercontent.com/ansibleplaybookbundle/mssql-apb/master/docs/img/sql-server.png
1111
documentationUrl:
@@ -16,15 +16,22 @@ tags:
1616
- mssql
1717
plans:
1818
- name: ephemeral
19-
description: This plan deploys an ephemeral MS SQL Server.
19+
description: This plan deploys an ephemeral Microsoft SQL Server on Linux.
2020
free: true
2121
default: true
2222
metadata:
2323
displayName: Ephemeral installation
2424
longDescription:
25-
This plan will deploy a standalone MS SQL Server on Linux
25+
This plan will deploy a standalone Microsoft SQL Server on Linux
2626
using ephemeral storage
2727
parameters:
28+
- name: ACCEPT_EULA
29+
title: Accept the End-User Licensing Agreement.
30+
type: boolean
31+
required: true
32+
default: false
33+
description: http://go.microsoft.com/fwlink/?LinkId=746388
34+
display_group: EULA Required
2835
- name: MSSQL_PASSWORD
2936
required: true
3037
default: "Hello123!"
@@ -42,36 +49,35 @@ plans:
4249
"The password must be at least 8 characters long and contain
4350
characters from three of the following four sets: Uppercase
4451
letters, Lowercase letters, Base 10 digits, and Symbols."
45-
display_group: MS SQL Config
52+
display_group: Microsoft SQL Config
4653
min_length: 8
4754
max_length: 128
4855
- name: MSSQL_DATABASE
4956
required: true
5057
default: TestDB
5158
pattern: "^[a-zA-Z0-9_-]*$"
5259
type: string
53-
title: Name of the MS SQL database to create.
54-
display_group: MS SQL Config
60+
title: Name of the Microsoft SQL database to create.
61+
display_group: Microsoft SQL Config
5562
- name: MSSQL_AGENT_ENABLED
5663
title: Enable SQL Server Agent.
5764
type: boolean
5865
required: true
5966
default: false
60-
description: By default, agent is disabled.
61-
display_group: MS SQL Config
67+
display_group: Microsoft SQL Config
6268
- name: MSSQL_PID
6369
required: true
6470
type: enum
6571
enum: ['Developer', 'Evaluation']
6672
default: Developer
6773
title: Set the SQL Server edition.
68-
display_group: MS SQL Config
74+
display_group: Microsoft SQL Config
6975
- name: MSSQL_LOCAL_IS
7076
title: Use existing mssql-server-linux imagestream in project.
7177
type: boolean
7278
required: true
7379
default: false
74-
display_group: MS SQL Config
80+
display_group: Microsoft SQL Config
7581
- name: MSSQL_LCID
7682
title: Set the language ID.
7783
type: integer
@@ -80,14 +86,14 @@ plans:
8086
description: For example - 1033 is English (US), 1036 is French.
8187
min_length: 4
8288
max_length: 4
83-
display_group: MS SQL Config
89+
display_group: Microsoft SQL Config
8490
- name: MSSQL_IMAGE_PULL
8591
title: "DeploymentConfig Image pull policy"
8692
type: enum
8793
enum: ['Always', 'IfNotPresent', 'Never']
8894
required: true
8995
default: IfNotPresent
90-
display_group: MS SQL Config
96+
display_group: Microsoft SQL Config
9197
- name: MSSQL_MEMORY_LIMIT
9298
required: true
9399
default: 3
@@ -105,14 +111,21 @@ plans:
105111
display_group: Environment Sizing
106112

107113
- name: persistent
108-
description: This plan deploys a persistent MS SQL Server.
114+
description: This plan deploys a persistent Microsoft SQL Server on Linux.
109115
free: true
110116
metadata:
111117
displayName: Persistent installation
112118
longDescription:
113-
This plan will deploy a standalone MS SQL Server on Linux
119+
This plan will deploy a standalone Microsoft SQL Server on Linux
114120
using persistent storage
115121
parameters:
122+
- name: ACCEPT_EULA
123+
title: Accept the End-User Licensing Agreement.
124+
type: boolean
125+
required: true
126+
default: false
127+
description: http://go.microsoft.com/fwlink/?LinkId=746388
128+
display_group: EULA Required
116129
- name: MSSQL_PASSWORD
117130
required: true
118131
default: "Hello123!"
@@ -130,36 +143,35 @@ plans:
130143
"The password must be at least 8 characters long and contain
131144
characters from three of the following four sets: Uppercase
132145
letters, Lowercase letters, Base 10 digits, and Symbols."
133-
display_group: MS SQL Config
146+
display_group: Microsoft SQL Config
134147
min_length: 8
135148
max_length: 128
136149
- name: MSSQL_DATABASE
137150
required: true
138151
default: TestDB
139152
pattern: "^[a-zA-Z0-9_-]*$"
140153
type: string
141-
title: Name of the MS SQL database to create.
142-
display_group: MS SQL Config
154+
title: Name of the Microsoft SQL database to create.
155+
display_group: Microsoft SQL Config
143156
- name: MSSQL_AGENT_ENABLED
144157
title: Enable SQL Server Agent.
145158
type: boolean
146159
required: true
147160
default: false
148-
description: By default, agent is disabled.
149-
display_group: MS SQL Config
161+
display_group: Microsoft SQL Config
150162
- name: MSSQL_PID
151163
required: true
152164
type: enum
153165
enum: ['Developer', 'Evaluation']
154166
default: Developer
155167
title: Set the SQL Server edition.
156-
display_group: MS SQL Config
168+
display_group: Microsoft SQL Config
157169
- name: MSSQL_LOCAL_IS
158170
title: Use existing mssql-server-linux imagestream in project.
159171
type: boolean
160172
required: true
161173
default: false
162-
display_group: MS SQL Config
174+
display_group: Microsoft SQL Config
163175
- name: MSSQL_LCID
164176
title: Set the language ID.
165177
type: integer
@@ -168,14 +180,14 @@ plans:
168180
description: For example - 1033 is English (US), 1036 is French.
169181
min_length: 4
170182
max_length: 4
171-
display_group: MS SQL Config
183+
display_group: Microsoft SQL Config
172184
- name: MSSQL_IMAGE_PULL
173185
title: "DeploymentConfig Image pull policy"
174186
type: enum
175187
enum: ['Always', 'IfNotPresent', 'Never']
176188
required: true
177189
default: IfNotPresent
178-
display_group: MS SQL Config
190+
display_group: Microsoft SQL Config
179191
- name: MSSQL_DATA_STORAGE_SIZE
180192
required: true
181193
default: 1

docs/img/sql-server.png

24.3 KB
Loading

playbooks/deprovision.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
- name: mssql-apb playbook to deprovision the application
33
hosts: localhost
4-
gather_facts: False
4+
gather_facts: false
55
connection: local
66
roles:
77
- role: ansible.kubernetes-modules

playbooks/provision.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
- name: mssql-apb playbook to provision the application
33
hosts: localhost
4-
gather_facts: False
4+
gather_facts: false
55
connection: local
66
roles:
77
- role: ansible.kubernetes-modules

playbooks/test.yml

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
- name: "[MSSQL-APB] [TEST] Test MSSQL APB"
33
hosts: localhost
4-
gather_facts: False
4+
gather_facts: false
55
connection: local
66
roles:
77
- role: ansible.kubernetes-modules
@@ -13,3 +13,4 @@
1313
action: test
1414
_apb_plan_id: persistent
1515
_apb_service_instance_id: 15c0e133-2a28-4795-a428-638a28c36072
16+
mssql_eula: true

roles/deprovision-mssql-apb/tasks/main.yml

+3-3
Original file line numberDiff line numberDiff line change
@@ -49,16 +49,16 @@
4949
async_status: jid={{ rm_svc.ansible_job_id }}
5050
register: svc_job_result
5151
until: svc_job_result.finished
52-
retries: 60
52+
retries: 120
5353

5454
- name: 'Check on DC task'
5555
async_status: jid={{ rm_dc.ansible_job_id }}
5656
register: dc_job_result
5757
until: dc_job_result.finished
58-
retries: 60
58+
retries: 120
5959

6060
- name: 'Check on secret task'
6161
async_status: jid={{ rm_secret.ansible_job_id }}
6262
register: s_job_result
6363
until: s_job_result.finished
64-
retries: 60
64+
retries: 120

roles/provision-mssql-apb/defaults/main.yml

+2
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@ service_instance: "{{ service_name }}-{{ _apb_service_instance_id }}"
44
service_port: 1433
55
state: "present"
66

7+
mssql_eula: "{{ ACCEPT_EULA | default('false') }}"
8+
79
mssql_image: "docker.io/tchughesiv/mssql-server-linux"
810
mssql_image_tag: "{{ MSSQL_IMAGE_TAG | default('latest') }}"
911
mssql_image_pull: "{{ MSSQL_IMAGE_PULL | default('IfNotPresent') }}"

roles/provision-mssql-apb/tasks/main.yml

+4-13
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
name: '{{ service_instance }}'
2525
namespace: '{{ namespace }}'
2626
string_data:
27-
ACCEPT_EULA: "Y"
27+
ACCEPT_EULA: "{{ lookup('template', 'eula.j2') }}"
2828
MSSQL_SA_PASSWORD: '{{ mssql_sa_pw }}'
2929
MSSQL_PID: '{{ mssql_pid }}'
3030
MSSQL_LCID: '{{ mssql_lcid | string }}'
@@ -87,9 +87,6 @@
8787
port: '{{ service_port }}'
8888
target_port: 1433
8989
state: '{{ state }}'
90-
async: 180
91-
poll: 0
92-
register: create_svc_cname
9390

9491

9592
##############################################################################
@@ -254,28 +251,22 @@
254251
async_status: jid={{ create_is.ansible_job_id }}
255252
register: is_job_result
256253
until: is_job_result.finished
257-
retries: 60
254+
retries: 120
258255
when: mssql_local != true
259256

260257
- name: 'Check on secret task'
261258
async_status: jid={{ create_secret.ansible_job_id }}
262259
register: s_job_result
263260
until: s_job_result.finished
264-
retries: 60
261+
retries: 120
265262

266263
- name: 'Check on PVC task'
267264
async_status: jid={{ create_pvc.ansible_job_id }}
268265
register: pvc_job_result
269266
until: pvc_job_result.finished
270-
retries: 60
267+
retries: 120
271268
when: _apb_plan_id == "persistent"
272269

273-
- name: 'Check on service CNAME task'
274-
async_status: jid={{ create_svc_cname.ansible_job_id }}
275-
register: csvc_job_result
276-
until: csvc_job_result.finished
277-
retries: 60
278-
279270
- name: Wait for mssql to come up
280271
wait_for:
281272
host: '{{ service_instance }}.{{ namespace }}.svc'
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
{% if mssql_eula %}Y{% endif %}

0 commit comments

Comments
 (0)