Skip to content

Commit

Permalink
Upd: added openshift hallmarking
Browse files Browse the repository at this point in the history
  • Loading branch information
nxt-ext committed Feb 27, 2014
1 parent 5f54c6e commit c75500b
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
2 changes: 1 addition & 1 deletion playbooks/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@
- setup properties
handlers:
- name: generate hallmark
local_action: command wget -qO- -t 2 -T 5 "http://127.0.0.1:7876/nxt?requestType=markHost&secretPhrase={{ secret_phrase|urlencode }}&host={{ inventory_hostname }}&weight={{ hallmark_weight }}&date={{ hallmark_date }}"
local_action: command wget -qO- -t 2 -T 5 "http://127.0.0.1:7876/nxt" --post-data="requestType=markHost&secretPhrase={{ secret_phrase|urlencode }}&host={{ inventory_hostname }}&weight={{ hallmark_weight }}&date={{ hallmark_date }}"
register: hallmark_result
when: secret_phrase != ""
- name: kill old nxt
Expand Down
12 changes: 12 additions & 0 deletions playbooks/openshift/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,17 @@
nxt_local_folder: ~/ansible/nxt
nxt_remote_folder: ~/app-root/data/nxt-kit
nxt_cron_path: ~/app-root/runtime/repo/.openshift/cron/minutely
hallmark_date: "2013-12-11"
hallmark_weight: 100
kit_peerServerPort: 8080
kit_announcedPort: 80
kit_apiServerPort: 27876
kit_enableUIServer: "false"
vars_prompt:
- name: "secret_phrase"
prompt: "secret phrase for hallmarking [if empty hallmark is taken from `hallmark_predef` host variable]"
default: ""
private: yes
tasks:
- name: check remote folders
file: path={{ item }} state=directory mode=0744
Expand Down Expand Up @@ -53,13 +60,18 @@
shell: /bin/true
when: localmd5.results[1].stdout != remotemd5.results[1].stdout
notify:
- generate hallmark
- kill old nxt
- kill nxt
- copy lastest distrib
- unpack new version
- set IP
- setup properties
handlers:
- name: generate hallmark
local_action: command wget -qO- -t 2 -T 5 "http://127.0.0.1:7876/nxt" --post-data="requestType=markHost&secretPhrase={{ secret_phrase|urlencode }}&host={{ inventory_hostname }}&weight={{ hallmark_weight }}&date={{ hallmark_date }}"
register: hallmark_result
when: secret_phrase != ""
# Obsolete and will be removed
- name: kill old nxt
shell: pkill -f 'java \-jar start.jar'
Expand Down

0 comments on commit c75500b

Please sign in to comment.