Skip to content

Commit 8b5d15d

Browse files
committed
some fixes suggested by david
1 parent 2b76ba8 commit 8b5d15d

File tree

2 files changed

+15
-4
lines changed

2 files changed

+15
-4
lines changed

chapter_09_docker.asciidoc

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1479,4 +1479,8 @@ Some typical pain points--networking, ports, static files, and the database::
14791479
and some configuration issues like static files.
14801480
14811481
1482+
// TODO: add debugging tips docker ps, docker inspect, docker logs.
1483+
// also brief description of network debugging: try curl outside, try curl inside, restart pc / docker /colima
1484+
// also maybe the lsof command to see who's using what port
1485+
14821486
*******************************************************************************

chapter_11_ansible.asciidoc

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -306,7 +306,7 @@ for.
306306
307307
- name: Install docker #<1>
308308
ansible.builtin.apt: #<2>
309-
name: docker #<3>
309+
name: docker.io #<3>
310310
state: latest
311311
update_cache: true
312312
become: true
@@ -331,7 +331,9 @@ for.
331331
around the `apt` Debian & Ubuntu package management tool.
332332

333333
<3> Each module then provides a bunch of parameters which control how it works.
334-
Here we specify the `name` of the package we want to install ("docker")
334+
Here we specify the `name` of the package we want to install ("docker.io"footnote:[
335+
In the official docker installation instructions, you'll see a recommendation to install docker via a private package repository.
336+
I wanted to avoid that complexity for the book, but you should probably follow those instructions in a real-world scenario.])
335337
and tell it to update its cache first, which is required on a fresh server.
336338

337339
Most Ansible modules have pretty good documentation,
@@ -340,6 +342,7 @@ I often skip to the
340342
https://docs.ansible.com/ansible/latest/collections/ansible/builtin/apt_module.html#examples[Examples section].
341343

342344
// RITA: Please add a sentence or two to introduce the following code block.
345+
343346
[subs="specialcharacters,quotes"]
344347
----
345348
$ *ansible-playbook --user=elspeth -i staging.ottg.co.uk, infra/ansible-provision.yaml -vv*
@@ -392,6 +395,9 @@ computer Mother, in _Alien_.
392395
Ansible scripts are particularly satisfying in this regard.
393396

394397

398+
TIP: You may need to use the `--ask-become-pass` argument to `ansible-playbook`
399+
if you get an error "Missing sudo password".
400+
395401

396402
=== SSHing Into the Server and Viewing Container Logs
397403

@@ -472,7 +478,7 @@ In Ansible config, it looks like this:
472478
tasks:
473479
- name: Install docker
474480
ansible.builtin.apt:
475-
name: docker
481+
name: docker.io
476482
state: latest
477483
become: true
478484
@@ -1000,7 +1006,8 @@ and reloads it automatically if it crashes.
10001006
*******************************************************************************
10011007
10021008
A few more places to look and things to try, now that we've introduced
1003-
Docker into the mix, should things not go according to plan:
1009+
Docker into the mix, should things not go according to plan--all of these
1010+
should be run on the server, inside an SSH session:
10041011
10051012
- You can check the Container logs using
10061013
`docker logs superlists`.

0 commit comments

Comments
 (0)