-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcheckout-prep-only.yml
100 lines (82 loc) · 2.81 KB
/
checkout-prep-only.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
#__BEGIN_LICENSE__
# Copyright (c) 2015, United States Government, as represented by the
# Administrator of the National Aeronautics and Space Administration.
# All rights reserved.
#
# The xGDS platform is licensed under the Apache License, Version 2.0
# (the "License"); you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
# http://www.apache.org/licenses/LICENSE-2.0.
#
# Unless required by applicable law or agreed to in writing, software distributed
# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
# CONDITIONS OF ANY KIND, either express or implied. See the License for the
# specific language governing permissions and limitations under the License.
#__END_LICENSE__
- hosts: localhost
vars_prompt:
- name: "xgds_sitename"
prompt: "xGDS site to install"
default: "basalt"
private: no
- name: "user_source_root"
prompt: "Parent directory for source check-out (defaults to $HOME if blank)"
default: null
private: no
- name: "mysql_host"
prompt: "MySQL hostname (keep default 'localhost' to install local MySQL)"
default: "localhost"
private: no
- name: "mysql_user"
prompt: "MySQL remote user ID (use default of 'root' for local install)"
private: no
default: "root"
- name: "db_password"
prompt: "Please enter MySQL database password"
private: yes
confirm: yes
- name: "bing_maps_api_key"
prompt: "Bing maps API key for baselayer map"
private: no
default: ""
- name: "django_superuser"
prompt: "Django adminstrator username"
private: no
default: "xgds"
- name: "django_superuser_password"
prompt: "Django administrator password"
default: "xgds"
private: yes
confirm: yes
- name: "relay_destination_host"
prompt: "Relay destination host"
private: no
default: "localhost"
vars:
source_root: "{{ user_source_root | default(ansible_user_dir, true) }}"
tasks:
- name: Be sure MySQL is running
shell: /usr/bin/mysqld_safe </dev/null >/dev/null 2>&1 &
become: true
- name: Wait for MySQL startup
wait_for:
path: /var/run/mysqld/mysqld.sock
delay: 5
timeout: 60
- include: apache/apache-setup.yml
become: true
- include: couchdb/couchdb-setup.yml
become: true
- name: Create empty xGDS database
mysql_db:
name: xgds_{{ xgds_sitename }}
state: present
login_user: "{{ mysql_user }}"
login_password: "{{ db_password }}"
register: xgds_database
- include: code-prep/xgds-checkout.yml
- include: code-prep/xgds-config.yml
- include: code-prep/xgds-3dview-checkout.yml
handlers:
- include: handlers.yml
become: true