Skip to content

Commit 739440b

Browse files
authored
docs: remove redundant fixes from mac setup codelab (#523)
1 parent 0288e52 commit 739440b

File tree

1 file changed

+12
-225
lines changed

1 file changed

+12
-225
lines changed

KRAKEN_MAC_SETUP_CODELAB.md

Lines changed: 12 additions & 225 deletions
Original file line numberDiff line numberDiff line change
@@ -29,218 +29,9 @@ git clone https://github.com/uber/kraken.git
2929
cd kraken
3030
```
3131

32-
## Step 2: Fix Binary Permissions (Required Fix)
32+
## Step 2: Build and Start Kraken
3333

34-
The original Dockerfiles have a permission issue where the binaries aren't executable. We need to fix this:
35-
36-
### Fix Agent Dockerfile
37-
38-
Edit `docker/agent/Dockerfile` and add `chmod +x` after copying the binary:
39-
40-
```dockerfile
41-
# Find this section:
42-
COPY ./agent/agent /usr/bin/kraken-agent
43-
# Add this line after it:
44-
RUN chmod +x /usr/bin/kraken-agent
45-
46-
USER ${USERNAME}
47-
```
48-
49-
### Fix All Other Dockerfiles
50-
51-
Apply the same fix to other Dockerfiles:
52-
53-
**docker/origin/Dockerfile:**
54-
```dockerfile
55-
COPY ./origin/origin /usr/bin/kraken-origin
56-
RUN chmod +x /usr/bin/kraken-origin
57-
58-
USER ${USERNAME}
59-
```
60-
61-
**docker/tracker/Dockerfile:**
62-
```dockerfile
63-
COPY ./tracker/tracker /usr/bin/kraken-tracker
64-
RUN chmod +x /usr/bin/kraken-tracker
65-
66-
USER ${USERNAME}
67-
```
68-
69-
**docker/proxy/Dockerfile:**
70-
```dockerfile
71-
COPY ./proxy/proxy /usr/bin/kraken-proxy
72-
RUN chmod +x /usr/bin/kraken-proxy
73-
74-
USER ${USERNAME}
75-
```
76-
77-
**docker/build-index/Dockerfile:**
78-
```dockerfile
79-
COPY ./build-index/build-index /usr/bin/kraken-build-index
80-
RUN chmod +x /usr/bin/kraken-build-index
81-
82-
USER ${USERNAME}
83-
```
84-
85-
**docker/testfs/Dockerfile:**
86-
```dockerfile
87-
COPY tools/bin/testfs/testfs /usr/bin/kraken-testfs
88-
RUN chmod +x /usr/bin/kraken-testfs
89-
90-
USER ${USERNAME}
91-
```
92-
93-
**docker/herd/Dockerfile:**
94-
```dockerfile
95-
COPY ./build-index/build-index /usr/bin/kraken-build-index
96-
COPY ./origin/origin /usr/bin/kraken-origin
97-
COPY ./proxy/proxy /usr/bin/kraken-proxy
98-
COPY ./tools/bin/testfs/testfs /usr/bin/kraken-testfs
99-
COPY ./tracker/tracker /usr/bin/kraken-tracker
100-
101-
RUN chmod +x /usr/bin/kraken-build-index && \
102-
chmod +x /usr/bin/kraken-origin && \
103-
chmod +x /usr/bin/kraken-proxy && \
104-
chmod +x /usr/bin/kraken-testfs && \
105-
chmod +x /usr/bin/kraken-tracker
106-
107-
USER ${USERNAME}
108-
```
109-
110-
## Step 3: Fix TLS Configuration (Required Fix)
111-
112-
The development configuration has TLS mismatches. We need to disable TLS consistently across all services for local development.
113-
114-
### Fix Build-Index Configuration
115-
116-
Edit `examples/devcluster/config/build-index/development.yaml`:
117-
118-
Find the `tls:` section and add `disabled: true` for both server and client:
119-
120-
```yaml
121-
tls:
122-
name: kraken
123-
cas:
124-
- path: /etc/kraken/tls/ca/server.crt
125-
server:
126-
disabled: true # Add this line
127-
cert:
128-
path: /etc/kraken/tls/ca/server.crt
129-
key:
130-
path: /etc/kraken/tls/ca/server.key
131-
passphrase:
132-
path: /etc/kraken/tls/ca/passphrase
133-
client:
134-
disabled: true # Add this line
135-
cert:
136-
path: /etc/kraken/tls/client/client.crt
137-
key:
138-
path: /etc/kraken/tls/client/client.key
139-
passphrase:
140-
path: /etc/kraken/tls/client/passphrase
141-
```
142-
143-
### Fix Origin Configuration
144-
145-
Edit `examples/devcluster/config/origin/development.yaml` and apply the same TLS fix:
146-
147-
```yaml
148-
tls:
149-
name: kraken
150-
cas:
151-
- path: /etc/kraken/tls/ca/server.crt
152-
server:
153-
disabled: true # Add this line
154-
cert:
155-
path: /etc/kraken/tls/ca/server.crt
156-
key:
157-
path: /etc/kraken/tls/ca/server.key
158-
passphrase:
159-
path: /etc/kraken/tls/ca/passphrase
160-
client:
161-
disabled: true # Add this line
162-
cert:
163-
path: /etc/kraken/tls/client/client.crt
164-
key:
165-
path: /etc/kraken/tls/client/client.key
166-
passphrase:
167-
path: /etc/kraken/tls/client/passphrase
168-
```
169-
170-
### Fix Tracker Configuration
171-
172-
Edit `examples/devcluster/config/tracker/development.yaml`:
173-
174-
```yaml
175-
tls:
176-
name: kraken
177-
cas:
178-
- path: /etc/kraken/tls/ca/server.crt
179-
server:
180-
disabled: true # Add this line
181-
cert:
182-
path: /etc/kraken/tls/ca/server.crt
183-
key:
184-
path: /etc/kraken/tls/ca/server.key
185-
passphrase:
186-
path: /etc/kraken/tls/ca/passphrase
187-
client:
188-
disabled: true # Add this line
189-
cert:
190-
path: /etc/kraken/tls/client/client.crt
191-
key:
192-
path: /etc/kraken/tls/client/client.key
193-
passphrase:
194-
path: /etc/kraken/tls/client/passphrase
195-
```
196-
197-
### Fix Proxy Configuration
198-
199-
Edit `examples/devcluster/config/proxy/development.yaml`:
200-
201-
```yaml
202-
tls:
203-
name: kraken
204-
cas:
205-
- path: /etc/kraken/tls/ca/server.crt
206-
server:
207-
disabled: true # Already present, verify it's there
208-
cert:
209-
path: /etc/kraken/tls/ca/server.crt
210-
key:
211-
path: /etc/kraken/tls/ca/server.key
212-
passphrase:
213-
path: /etc/kraken/tls/ca/passphrase
214-
client:
215-
disabled: true # Add this line
216-
cert:
217-
path: /etc/kraken/tls/client/client.crt
218-
key:
219-
path: /etc/kraken/tls/client/client.key
220-
passphrase:
221-
path: /etc/kraken/tls/client/passphrase
222-
```
223-
224-
### Fix Agent Configuration
225-
226-
Edit `examples/devcluster/config/agent/development.yaml`:
227-
228-
Find the `client:` section under `tls:` and add `disabled: true`:
229-
230-
```yaml
231-
client:
232-
disabled: true # Add this line
233-
cert:
234-
path: /etc/kraken/tls/client/client.crt
235-
key:
236-
path: /etc/kraken/tls/client/client.key
237-
passphrase:
238-
path: /etc/kraken/tls/client/passphrase
239-
```
240-
241-
## Step 4: Build and Start Kraken
242-
243-
Now that we've fixed the configuration issues, let's build and start Kraken:
34+
Let's build and start Kraken:
24435

24536
```bash
24637
# Build binaries and start the development cluster
@@ -255,7 +46,7 @@ This command will:
25546
- `kraken-agent-one`: First agent instance
25647
- `kraken-agent-two`: Second agent instance
25748

258-
## Step 5: Verify the Setup
49+
## Step 3: Verify the Setup
25950

26051
Check that all containers are running:
26152

@@ -287,7 +78,7 @@ Test the registry endpoints.
28778

28879
All should return successful responses with **HTTP 200 OK** status.
28980

290-
## Step 6: Test Image Push and Pull
81+
## Step 4: Test Image Push and Pull
29182

29283
### Push an Image to Kraken
29384

@@ -327,7 +118,7 @@ docker pull localhost:16000/test/nginx:latest
327118
docker pull localhost:17000/test/nginx:latest
328119
```
329120

330-
## Step 7: Monitor P2P Activity
121+
## Step 5: Monitor P2P Activity
331122

332123
To see the P2P distribution in action, monitor the logs:
333124

@@ -345,7 +136,7 @@ Look for log entries showing:
345136
- Blob transfers between agents
346137
- Origin seeding activity
347138

348-
## Step 8: Understanding the Architecture
139+
## Step 6: Understanding the Architecture
349140

350141
### Port Mapping
351142

@@ -365,7 +156,7 @@ Look for log entries showing:
365156
2. **Pull Flow**: `docker pull localhost:16000/...` → Agent → Tracker (find peers) → P2P download from other agents/origin
366157
3. **P2P Magic**: When multiple agents pull the same image, they share data directly with each other
367158

368-
## Step 9: Advanced Testing
159+
## Step 7: Advanced Testing
369160

370161
### Test P2P Benefits
371162

@@ -470,10 +261,8 @@ If internal container tests return `{}` but external tests fail, it confirms fir
470261

471262
#### **Other Common Issues**
472263

473-
1. **Permission Denied Errors**: Make sure you applied the `chmod +x` fixes to all Dockerfiles
474-
2. **TLS Certificate Errors**: Ensure all configuration files have `disabled: true` for both server and client TLS
475-
3. **Port Conflicts**: Make sure ports are not in use by other applications
476-
4. **Docker Desktop**: Make sure Docker Desktop is running and `host.docker.internal` is available
264+
- **Port Conflicts**: Make sure ports are not in use by other applications
265+
- **Docker Desktop**: Make sure Docker Desktop is running and `host.docker.internal` is available
477266

478267
### Getting Help
479268

@@ -486,11 +275,9 @@ If internal container tests return `{}` but external tests fail, it confirms fir
486275
**Congratulations!** You've successfully
487276

488277
1. Set up a complete Kraken P2P Docker registry
489-
2. Fixed binary permission issues in Dockerfiles
490-
3. Resolved TLS configuration problems
491-
4. Tested image push and pull workflows
492-
5. Experienced P2P distribution in action
493-
6. Learned how Kraken's architecture works
278+
2. Tested image push and pull workflows
279+
3. Experienced P2P distribution in action
280+
4. Learned how Kraken's architecture works
494281

495282
## Next Steps
496283

0 commit comments

Comments
 (0)