This is an automated email from the ASF dual-hosted git repository.
ocket8888 pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/trafficcontrol.git
The following commit(s) were added to refs/heads/master by this push:
new 2310ddaafc Readme m1 notes cdn in a box (#7250)
2310ddaafc is described below
commit 2310ddaafc68c3622238d3f2a99389ceb0187d85
Author: Fabi Dias <[email protected]>
AuthorDate: Wed Dec 14 13:42:13 2022 -0700
Readme m1 notes cdn in a box (#7250)
* notes to build and run it on m1
* corrections
* corrections
* made corrections based on feedback on the pr
* corrections
---
infrastructure/cdn-in-a-box/README.md | 30 ++++++++++++++++++++++++++++++
1 file changed, 30 insertions(+)
diff --git a/infrastructure/cdn-in-a-box/README.md
b/infrastructure/cdn-in-a-box/README.md
index 1f5a9ad803..b115992db3 100644
--- a/infrastructure/cdn-in-a-box/README.md
+++ b/infrastructure/cdn-in-a-box/README.md
@@ -182,3 +182,33 @@ Try disabling SELinux or setting it to 'permissive'.
SELinux hates letting conta
### Traffic Vault container exits with cp /usr/local/share/ca-certificates cp:
missing destination
Bring all components down, remove the `traffic_ops/ca` directory, and delete
the volumes with `docker volume prune`. This will force the regeneration of the
certificates.
+
+## Notes for Apple M1 Pro Configuration
+
+### Code edits in the cdn-in-a-box directory
+
+Re/installed docker from the command line to use `--user=[your username]`
flag, and update the dockerfiles in the code for both enroller and traffic_ops
in the cdn-in-a-box folders with the correct architecture for the M1. Link to
install info for docker for [Install from command line]
(https://docs.docker.com/desktop/install/mac-install/) and use Install from
command line located in the "Mac with Apple Silicon" tab.
+
+- At the postgresql install, update the cdn-in-a-box/traffic_ops Dockerfile to
`-aarch64/pgdg-redhat-repo-latest.noarch.rpm` right after
`EL-${RHEL_VERSION%%.*}`.
+- At the first `FROM` of the cdn-in-a-box/enroller Dockerfile, append
`--platform=linux/amd64`.
+
+Build and run of it:
+In the trafficcontrol/infrastructure/cdn-in-a-box directory run the following:
+
+- `make build-builders` ~~> this will create all the rpms and copy each rpms
into its own folder in the cdn-in-a-box project. This will also create the dist
folder under trafficcontrol folder structure even if you deleted yours.
+
+- `docker-compose up` ~~> this will create docker images, and if rebuild is
needed, run `docker-compose up --build`.
+
+### Docker v4.11 and later of Docker Desktop for Mac
+
+"Privileged configurations are applied during the installation with the --user
flag on the install command. In this case, the user is not prompted to grant
root privileges on the first run of Docker Desktop. Specifically, the --user
flag:
+
+- Uninstalls the previous com.docker.vmnetd if present
+- Sets up symlinks for the user
+- Ensures that localhost is resolved to 127.0.0.1
+
+The limitation of this approach is that Docker Desktop can only be run by one
user account per machine, namely the one specified in the -–user flag."
+
+The above is a direct quote found in [Installing from the commandline]
(https://docs.docker.com/desktop/mac/permission-requirements/)
+
+Note: The Install from command line was the only install that resolved my
issue of being unable to build the docker images and run the containers in
localhost. Homebrew and the usual automatic install when double-clicking in the
Docker.dmg did not work.
\ No newline at end of file