diff --git a/playbooks/hosts/regcfp.fedorainfracloud.org.yml b/playbooks/hosts/regcfp.fedorainfracloud.org.yml index 9dc520764e..e1823242ee 100644 --- a/playbooks/hosts/regcfp.fedorainfracloud.org.yml +++ b/playbooks/hosts/regcfp.fedorainfracloud.org.yml @@ -25,20 +25,7 @@ - name: set hostname (required by some services, at least postfix need it) shell: "hostname {{inventory_hostname}}" - tasks: - - name: add packages - yum: state=present name={{ item }} - with_items: - - git - - nodejs - - npm - - postgresql - - postgresql-server - - wget - - unzip + roles: + - regcfp - - name: Clone the regcfp flock2016 branch - git: repo=https://github.com/puiterwijk/regcfp.git - dest=/srv/regcfp - version=flock2016 - clone=yes update=yes + tasks: diff --git a/roles/regcfp/files/regcfp.service b/roles/regcfp/files/regcfp.service new file mode 100644 index 0000000000..255acaff8e --- /dev/null +++ b/roles/regcfp/files/regcfp.service @@ -0,0 +1,12 @@ +[Service] +ExecStart=/bin/node /srv/regcfp/bin/www +Restart=always +StandardOutput=syslog +StandardError=syslog +SyslogIdentifier=regcfp +User=regcfp +Group=regcfp +Environment=NODE_ENV=production + +[Install] +WantedBy=multi-user.target diff --git a/roles/regcfp/handlers/main.yml b/roles/regcfp/handlers/main.yml new file mode 100644 index 0000000000..448f9853ca --- /dev/null +++ b/roles/regcfp/handlers/main.yml @@ -0,0 +1,3 @@ +--- +- name: restart regcfp + service: name=regcfp state=restarted diff --git a/roles/regcfp/tasks/main.yml b/roles/regcfp/tasks/main.yml new file mode 100644 index 0000000000..ade49e2939 --- /dev/null +++ b/roles/regcfp/tasks/main.yml @@ -0,0 +1,34 @@ +--- + +- name: install needed packages + yum: pkg={{ item }} state=present + with_items: + - git + - node + - npm + - postgresql + - posgresql-server + tags: + - packages + +# Todo: Create the database + +- name: Clone the regcfp flock2016 branch + git: repo=https://github.com/puiterwijk/regcfp.git + dest=/srv/regcfp + version=flock2016 + clone=yes update=yes + + +- name: copy over the server config + template: src=config.json dest=/srv/regcfp/config/config.json mode=0640 + notify: + - restart regcfp + +- name: copy over the systemd file + template: src=regcfp.service dest=/etc/systemd/system/regcfp.service mode=0640 + notify: + - restart regcfp + +- name: glusterd service + service: name=glusterd state=started enabled=yes diff --git a/roles/regcfp/templates/config.json b/roles/regcfp/templates/config.json new file mode 100644 index 0000000000..7ec2b40080 --- /dev/null +++ b/roles/regcfp/templates/config.json @@ -0,0 +1,161 @@ +{ + "development": { + "theming": { + "site_name": "FLOCK 2016 Registration", + "event_name": "Flock 2016", + "logo": "" + }, + "secret": "{{ regcfp_secret }}", + "database": { + "database": "database.sqlite", + "dialect": "sqlite", + "storage": "database.sqlite", + "define": { + "paranoid": true + } + }, + + "email": { + "from": "myevent@example.com", + "transport": { + "host": "localhost" + } + }, + + "listen": { + "http": { + "enabled": true, + "listenip": "0.0.0.0", + "port": 80 + }, + "https": { + "enabled": false, + "only": true, + "url": "https://register.flocktofedora.org", + "listenip": "0.0.0.0", + "port": 443, + "cert": "certificate.crt", + "key": "certificate.key" + } + }, + + "persona_audience": "https://register.flocktofedora.org", + + "permissions": { + "admin": ["puiterwijk@fedoraproject.org"], + "papers": { + "submit": ["puiterwijk@fedoraproject.org"], + "list": { + "accepted": ["puiterwijk@fedoraproject.org"], + "own": ["puiterwijk@fedoraproject.org"], + "all": ["puiterwijk@fedoraproject.org"] + }, + "tag": ["puiterwijk@fedoraproject.org"], + "vote": ["puiterwijk@fedoraproject.org"], + "showvotes": ["puiterwijk@fedoraproject.org"], + "accept": ["puiterwijk@fedoraproject.org"] + }, + "registration": { + "register": ["puiterwijk@fedoraproject.org"], + "pay": [], + "request_receipt": [], + "view_public": ["puiterwijk@fedoraproject.org"], + "view_all": ["puiterwijk@fedoraproject.org"], + "add_payment": [], + "print_badge": ["puiterwijk@fedoraproject.org"], + "desk": ["puiterwijk@fedoraproject.org"] + } + }, + + "papers": { + "enabled": true, + "tracks": [ + "security", + "data" + ] + }, + + "registration": { + "enabled": true, + "fields": { + "country": { + "display_name": "Country", + "type": "country", + "required": true, + "private": true, + "placeholder": "Country of origin" + }, + "ircnick": { + "display_name": "IRC Nickname", + "type": "string", + "required": true, + "private": true, + "placeholder": "IRC Nickname" + }, + "shirtsize": { + "display_name": "T-shirt size", + "type": "select", + "message": "This will be kept private", + "required": false, + "private": true, + "placeholder": "", + "options": [ + "XS", + "S", + "M", + "L", + "XL" + ] + } + }, + + + + + "payment_product_name": "My Event Registration Fee", + "currencies": { + "EUR": { + "symbol": "€", + "min_amount_for_receipt": 20, + "default_amount": 40, + "conversion_rate": 1 + }, + "SEK": { + "symbol": "kr", + "min_amount_for_receipt": 190, + "default_amount": 380, + "conversion_rate": 0.11 + } + }, + "main_currency": "EUR", + "paypal_experience_profile": "", + "desk_word": "something", + + "paypal": { + "api_credentials": { + "mode": "live", + "client_id": "", + "client_secret": "" + }, + + "profile": { + "name": "Event Registration Profile", + "presentation": { + "brand_name": "Event Foundation", + "logo_image": "https://www.guadec.org/wp-content/uploads/2014/10/guadec-logo-white.png", + "locale_code": "US" + }, + "input_fields": { + "allow_note": true, + "no_shipping": 1, + "address_override": 0 + }, + "flow_config": { + "landing_page_type": "billing", + "bank_txn_pending_url": "http://www.guadec.org" + } + } + } + } + } +}