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
The mini-lab is a small, virtual setup to locally run the metal-stack. It deploys the metal control plane and a partition with two simulated leaf switches. The lab can be used for trying out metal-stack, demonstration purposes or development.
3
+
The mini-lab is a small, virtual setup to locally run the metal-stack. It deploys the metal control plane and a metal-stack partition with two simulated leaf switches. The lab can be used for trying out metal-stack, demonstration purposes or development.
4
4
5
5

6
6
7
-
This project can also be used as a template for writing your own metal-stack deployments.
7
+
ℹ This project can also be used as a template for writing your own metal-stack deployments.
Start the mini-lab with a kind cluster, a metal-api instance as well as two containers wrapping leaf switches and another container that hosts two user-allocatable machines:
82
+
83
+
```bash
90
84
make
85
+
# containerlab will ask you for root permissions (https://github.com/srl-labs/containerlab/issues/669)
91
86
```
92
87
93
-
Two machines in status `PXE booting`are visible with`metalctl machine ls`
88
+
After the deployment and waiting for a short amoung of time, two machines in status `PXE booting`become visible through`metalctl machine ls`:
__Alternatively__ you may want to issue the `metalctl` commands by your own:
115
+
__Alternatively__, you may want to issue the `metalctl` commands on your own:
121
116
122
117
```bash
123
118
docker-compose run metalctl network allocate \
124
-
--partition vagrant \
119
+
--partition mini-lab \
125
120
--project 00000000-0000-0000-0000-000000000000 \
126
-
--name vagrant
121
+
--name user-private-network
127
122
128
-
#Lookup the network ID and create a machine
123
+
#lookup the network ID and create a machine
129
124
docker-compose run metalctl machine create \
130
125
--description test \
131
126
--name machine \
132
127
--hostname machine \
133
128
--project 00000000-0000-0000-0000-000000000000 \
134
-
--partition vagrant \
129
+
--partition mini-lab \
135
130
--image ubuntu-20.04 \
136
131
--size v1-small-x86 \
137
132
--networks <network-ID>
138
133
139
-
#Create a firewall that is also connected to the virtual internet-vagrant-lab network
134
+
#create a firewall that is also connected to the virtual internet-mini-lab network
140
135
docker-compose run metalctl machine create \
141
136
--description fw \
142
137
--name fw \
143
138
--hostname fw \
144
139
--project 00000000-0000-0000-0000-000000000000 \
145
-
--partition vagrant \
140
+
--partition mini-lab \
146
141
--image firewall-ubuntu-2.0 \
147
142
--size v1-small-x86 \
148
-
--networks internet-vagrant-lab,$(privatenet)
143
+
--networks internet-mini-lab,$(privatenet)
149
144
```
150
145
151
146
See the installation process in action
@@ -170,12 +165,10 @@ e0ab02d2-27cd-5a5e-8efc-080ba80cf258 Phoned Home 2s 21s machin
170
165
Login with user name metal and the console password from
171
166
172
167
```bash
173
-
docker-compose run metalctl machine describe e0ab02d2-27cd-5a5e-8efc-080ba80cf258 | grep password
174
-
175
-
consolepassword: ...
168
+
docker-compose run metalctl machine consolepassword e0ab02d2-27cd-5a5e-8efc-080ba80cf258
176
169
```
177
170
178
-
If you want to access the firewall with SSH or have internet connectivity from the firewall and machine, you'll need to have a static route configured that points to the vagrant boxes of the leaf switches:
171
+
If you want to access the firewall with SSH or have internet connectivity from the firewall and machine, you'll need to have a static route configured that points to the leaf switches:
179
172
180
173
```bash
181
174
# Add the route to the network internet-vagrant-lab 100.255.254.0/24 via leaf01 and leaf02, whose IPs are dynamically allocated. Make sure there's no old route before execution.
@@ -185,7 +178,7 @@ make route
185
178
ssh metal@100.255.254.1
186
179
```
187
180
188
-
To remove the kind cluster and the vagrant boxes, run
181
+
To remove the kind cluster, the switches and machines, run:
189
182
190
183
```bash
191
184
make cleanup
@@ -201,9 +194,9 @@ docker-compose run metalctl machine reinstall \
201
194
e0ab02d2-27cd-5a5e-8efc-080ba80cf258
202
195
```
203
196
204
-
### Remove machine
197
+
### Free machine
205
198
206
-
Remove a machine with
199
+
Free a machine with
207
200
208
201
```bash
209
202
docker-compose run metalctl machine rm e0ab02d2-27cd-5a5e-8efc-080ba80cf258
@@ -222,17 +215,3 @@ In order to start specific flavor, you can define the flavor as follows:
222
215
export MINI_LAB_FLAVOR=cluster-api
223
216
make
224
217
```
225
-
226
-
## Development of metal-api, metal-hammer and metal-core
227
-
228
-
To simplify developing changes for the `metal-api`, `metal-hammer` and `metal-core`, it is possible to use development artifacts from within the mini-lab.
229
-
See the [dev instructions](DEV_INSTRUCTIONS.md) for more details.
0 commit comments