You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: content/actions/learn-github-actions/migrating-from-travis-ci-to-github-actions.md
+6Lines changed: 6 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -164,6 +164,12 @@ git:
164
164
</tr>
165
165
</table>
166
166
167
+
#### Using environment variables in a matrix
168
+
169
+
Travis CI and {% data variables.product.prodname_actions %} can both add custom environment variables to a test matrix, which allows you to refer to the variable in a later step.
170
+
171
+
In {% data variables.product.prodname_actions %}, you can use the `include` key to add custom environment variables to a matrix. {% data reusables.github-actions.matrix-variable-example %}
172
+
167
173
### Key features in {% data variables.product.prodname_actions %}
168
174
169
175
When migrating from Travis CI, consider the following key features in {% data variables.product.prodname_actions %}:
Copy file name to clipboardExpand all lines: content/actions/reference/workflow-syntax-for-github-actions.md
+2-27Lines changed: 2 additions & 27 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -878,34 +878,9 @@ strategy:
878
878
879
879
##### Using environment variables in a matrix
880
880
881
-
You can add custom environment variables for each test combination by using `include` with `env`. You can then refer to the custom environment variables in a later step.
881
+
You can add custom environment variables for each test combination by using the `include` key. You can then refer to the custom environment variables in a later step.
882
882
883
-
In this example, the matrix entries for `node-version` are each configured to use different values for the `site` and `datacenter` environment variables. The `Echo site details` step then uses {% raw %}`env: ${{ matrix.env }}`{% endraw %} to refer to the custom variables:
884
-
885
-
{% raw %}
886
-
```yaml
887
-
name: Node.js CI
888
-
on: [push]
889
-
jobs:
890
-
build:
891
-
runs-on: ubuntu-latest
892
-
strategy:
893
-
matrix:
894
-
include:
895
-
- node-version: 10.x
896
-
site: "prod"
897
-
datacenter: "site-a"
898
-
- node-version: 12.x
899
-
site: "dev"
900
-
datacenter: "site-b"
901
-
steps:
902
-
- name: Echo site details
903
-
env:
904
-
SITE: ${{ matrix.site }}
905
-
DATACENTER: ${{ matrix.datacenter }}
906
-
run: echo $SITE $DATACENTER
907
-
```
908
-
{% endraw %}
883
+
{% data reusables.github-actions.matrix-variable-example %}
Copy file name to clipboardExpand all lines: content/admin/enterprise-management/configuring-high-availability-replication-for-a-cluster.md
+61-43Lines changed: 61 additions & 43 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -57,32 +57,36 @@ Before you define a secondary datacenter for your passive nodes, ensure that you
57
57
mysql-master = <em>HOSTNAME</em>
58
58
redis-master = <em>HOSTNAME</em>
59
59
<strong>primary-datacenter = default</strong>
60
-
```
60
+
```
61
61
62
62
- Optionally, change the name of the primary datacenter to something more descriptive or accurate by editing the value of `primary-datacenter`.
63
63
64
64
4. {% data reusables.enterprise_clustering.configuration-file-heading %} Under each node's heading, add a new key-value pair to assign the node to a datacenter. Use the same value as `primary-datacenter` from step 3 above. For example, if you want to use the default name (`default`), add the following key-value pair to the section for each node.
65
65
66
-
datacenter = default
66
+
```
67
+
datacenter = default
68
+
```
67
69
68
70
When you're done, the section foreach nodein the cluster configuration file should look like the following example. {% data reusables.enterprise_clustering.key-value-pair-order-irrelevant %}
69
71
70
-
```shell
71
-
[cluster "<em>HOSTNAME</em>"]
72
-
<strong>datacenter = default</strong>
73
-
hostname = <em>HOSTNAME</em>
74
-
ipv4 = <em>IP ADDRESS</em>
72
+
```shell
73
+
[cluster "<em>HOSTNAME</em>"]
74
+
<strong>datacenter = default</strong>
75
+
hostname = <em>HOSTNAME</em>
76
+
ipv4 = <em>IP ADDRESS</em>
77
+
...
75
78
...
76
-
...
77
-
```
79
+
```
78
80
79
-
{% note %}
81
+
{% note %}
80
82
81
-
**Note**: If you changed the name of the primary datacenter in step 3, find the `consul-datacenter` key-value pair in the section for each node and change the value to the renamed primary datacenter. For example, if you named the primary datacenter `primary`, use the following key-value pair for each node.
83
+
**Note**: If you changed the name of the primary datacenter in step 3, find the `consul-datacenter` key-value pair in the section for each node and change the value to the renamed primary datacenter. For example, if you named the primary datacenter `primary`, use the following key-value pair for each node.
82
84
83
-
consul-datacenter = primary
85
+
```
86
+
consul-datacenter = primary
87
+
```
84
88
85
-
{% endnote %}
89
+
{% endnote %}
86
90
87
91
{% data reusables.enterprise_clustering.apply-configuration %}
88
92
@@ -103,31 +107,37 @@ For an example configuration, see "[Example configuration](#example-configuratio
103
107
104
108
1. For each node in your cluster, provision a matching virtual machine with identical specifications, running the same version of {% data variables.product.prodname_ghe_server %}. Note the IPv4 address and hostname for each new cluster node. For more information, see "[Prerequisites](#prerequisites)."
105
109
106
-
{% note %}
110
+
{% note %}
107
111
108
-
**Note**: If you're reconfiguring high availability after a failover, you can use the old nodes from the primary datacenter instead.
112
+
**Note**: If you're reconfiguring high availability after a failover, you can use the old nodes from the primary datacenter instead.
109
113
110
-
{% endnote %}
114
+
{% endnote %}
111
115
112
116
{% data reusables.enterprise_clustering.ssh-to-a-node %}
4. Create a copy of your existing cluster configuration file in a temporary location, like _/home/admin/cluster-passive.conf_. Delete unique key-value pairs for IP addresses (`ipv*`), UUIDs (`uuid`), and public keys for WireGuard (`wireguard-pubkey`).
6. Decide on a name for the secondary datacenter where you provisioned your passive nodes, then update the temporary cluster configuration file with the new datacenter name. Replace `SECONDARY` with the name you choose.
127
137
128
138
```shell
129
-
sed -i 's/datacenter = default/datacenter = <em>SECONDARY</em>/g'~/cluster-passive.conf
130
-
```
139
+
sed -i 's/datacenter = default/datacenter = <em>SECONDARY</em>/g' ~/cluster-passive.conf
140
+
```
131
141
132
142
7. Decide on a pattern for the passive nodes' hostnames.
133
143
@@ -140,7 +150,7 @@ For an example configuration, see "[Example configuration](#example-configuratio
140
150
8. Open the temporary cluster configuration file from step 3 in a text editor. For example, you can use Vim.
141
151
142
152
```shell
143
-
sudo vim ~/cluster-passive.conf
153
+
sudo vim ~/cluster-passive.conf
144
154
```
145
155
146
156
9. In each section within the temporary cluster configuration file, update the node's configuration. {% data reusables.enterprise_clustering.configuration-file-heading %}
@@ -150,37 +160,37 @@ For an example configuration, see "[Example configuration](#example-configuratio
150
160
- Add a new key-value pair, `replica = enabled`.
151
161
152
162
```shell
153
-
[cluster "<em>NEW PASSIVE NODE HOSTNAME</em>"]
154
-
...
155
-
hostname = <em>NEW PASSIVE NODE HOSTNAME</em>
156
-
ipv4 = <em>NEW PASSIVE NODE IPV4 ADDRESS</em>
157
-
<strong>replica = enabled</strong>
163
+
[cluster "<em>NEW PASSIVE NODE HOSTNAME</em>"]
164
+
...
165
+
hostname = <em>NEW PASSIVE NODE HOSTNAME</em>
166
+
ipv4 = <em>NEW PASSIVE NODE IPV4 ADDRESS</em>
167
+
<strong>replica = enabled</strong>
168
+
...
158
169
...
159
-
...
160
170
```
161
171
162
172
10. Append the contents of the temporary cluster configuration file that you created in step 4 to the active configuration file.
11. Designate the primary MySQL and Redis nodes in the secondary datacenter. Replace `REPLICA MYSQL PRIMARY HOSTNAME` and `REPLICA REDIS PRIMARY HOSTNAME` with the hostnames of the passives node that you provisioned to match your existing MySQL and Redis primaries.
169
179
170
180
```shell
171
-
git config -f /data/user/common/cluster.conf cluster.mysql-master-replica <em>REPLICA MYSQL PRIMARY HOSTNAME</em>
**Warning**: Review your cluster configuration file before proceeding.
193
+
**Warning**: Review your cluster configuration file before proceeding.
184
194
185
195
- In the top-level `[cluster]` section, ensure that the values for `mysql-master-replica` and `redis-master-replica` are the correct hostnames for the passive nodes in the secondary datacenter that will serve as the MySQL and Redis primaries after a failover.
186
196
- In each section for an active node named <code>[cluster "<em>ACTIVE NODE HOSTNAME</em>"]</code>, double-check the following key-value pairs.
@@ -194,9 +204,9 @@ For an example configuration, see "[Example configuration](#example-configuratio
194
204
- `replica` should be configured as `enabled`.
195
205
- Take the opportunity to remove sections foroffline nodes that are no longerin use.
196
206
197
-
To review an example configuration, see "[Example configuration](#example-configuration)."
207
+
To review an example configuration, see "[Example configuration](#example-configuration)."
198
208
199
-
{% endwarning %}
209
+
{% endwarning %}
200
210
201
211
13. Initialize the new cluster configuration. {% data reusables.enterprise.use-a-multiplexer %}
202
212
@@ -207,7 +217,7 @@ For an example configuration, see "[Example configuration](#example-configuratio
207
217
14. After the initialization finishes, {% data variables.product.prodname_ghe_server %} displays the following message.
208
218
209
219
```shell
210
-
Finished cluster initialization
220
+
Finished cluster initialization
211
221
```
212
222
213
223
{% data reusables.enterprise_clustering.apply-configuration %}
@@ -294,19 +304,27 @@ You can monitor the progress on any node in the cluster, using command-line tool
- Monitor replication of repository and Gist data:
300
312
301
-
ghe-spokes status
313
+
```
314
+
ghe-spokes status
315
+
```
302
316
303
317
- Monitor replication of attachment and LFS data:
304
318
305
-
ghe-storage replication-status
319
+
```
320
+
ghe-storage replication-status
321
+
```
306
322
307
323
- Monitor replication of Pages data:
308
324
309
-
ghe-dpages replication-status
325
+
```
326
+
ghe-dpages replication-status
327
+
```
310
328
311
329
You can use `ghe-cluster-status` to review the overall health of your cluster. For more information, see "[Command-line utilities](/enterprise/admin/configuration/command-line-utilities#ghe-cluster-status)."
0 commit comments