File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -46,6 +46,7 @@ COPY requirements.txt .
4646RUN pip3 install -r requirements.txt
4747
4848# Install ansible add-ons
49+ COPY ansible/requirements.yml ansible/requirements.yml
4950RUN ansible-galaxy install -r ansible/requirements.yml
5051
5152# Copy the source code to the working directory
Original file line number Diff line number Diff line change 6868
6969 - name : Apply VSchema
7070 shell : |
71- vtctldclient --server {{ groups['vtctld'][0] }}:15999 ApplyVSchema -- --vschema="$(cat /tmp/vschema_sysbench.json)" main
71+ vtctlclient --server {{ groups['vtctld'][0] }}:15999 ApplyVSchema -- --vschema="$(cat /tmp/vschema_sysbench.json)" main
7272
7373 - name : Print go version
7474 debug : msg="VSchema is applied."
Original file line number Diff line number Diff line change 1313- name : Ensure Primary
1414 register : ensure_latest
1515 shell : |
16- alias vc="vtctldclient --server {{ groups['vtctld'][0] }}:15999"
16+ alias vc="vtctlclient --server {{ groups['vtctld'][0] }}:15999"
1717 for keyspace in $(vc GetKeyspaces); do
1818 echo "working on ${keyspace}"
1919 for shard in $(vc FindAllShardsInKeyspace -- ${keyspace} | jq -r 'keys[]'); do
2020 echo "working on ${shard}"
21- primary =$(vc GetTablets --keyspace " ${keyspace}" --shard " ${shard}" --tablet-type primary | awk '{ print $1 }' | head -n1 )
22- if [ -z "${primary }" ]; then
21+ master =$(vc ListShardTablets -- ${keyspace}/ ${shard} | grep primary )
22+ if [ -z "${master }" ]; then
2323 echo "setting primary for ${keyspace}/${shard}"
24- vc InitShardPrimary -- --force ${keyspace}/${shard} $(vc GetTablets --keyspace " ${keyspace}" --shard " ${shard}" --tablet-type replica | awk '{ print $1 }' | head -n1)
24+ vc InitShardPrimary -- --force ${keyspace}/${shard} $(vc ListShardTablets ${keyspace}/ ${shard} | awk '{ print $1 }' | head -n1)
2525 else
26- vc SetReadWrite -- ${primary}
26+ vc SetReadWrite -- $(echo ${master} | awk '{ print $1 }' | head -n1)
2727 fi
2828 done
2929 done
Original file line number Diff line number Diff line change 135135 - files :
136136 - " {{ prometheus_config_dir }}/file_sd/gateways.yml"
137137 prometheus_remote_write :
138- - url : " http://{{ stats_remote_db_host }}/prom/api/v1/write"
139- basic_auth :
140- username : " {{ stats_remote_db_user }}"
141- password : " {{ stats_remote_db_password }}"
142138 - url : " http://{{ stats_remote_db_host }}:{{ stats_remote_db_port }}/api/v1/prom/write?db={{ stats_remote_db_database }}&u={{ stats_remote_db_user }}&p={{ stats_remote_db_password }}"
143139 prometheus_external_labels :
144140 exec_uuid : " exec_uuid"
You can’t perform that action at this time.
0 commit comments