ocket8888 commented on code in PR #7250:
URL: https://github.com/apache/trafficcontrol/pull/7250#discussion_r1048791517


##########
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 folder with the correct architecture for the M1. Link to install 
info for docker: https://docs.docker.com/desktop/install/mac-install/  and use 
Install from command line. 
+
+- Then update cdn-in-a-box/traffic_ops Dockerfile line 46 to 
-aarch64/pgdg-redhat-repo-latest.noarch.rpm after EL-${RHEL_VERSION%%.*} 
+- Add on line 18 of the cdn-in-a-box/enroller Dockerfile 
--platform=linux/amd64 after the 1st FROM.

Review Comment:
   To make this a bit more future-proof, avoid directly referencing line 
numbers. Instead, something like:
   
   > To the first `FROM` line in 
`infrastructure/cdn-in-a-box/enroller/Dockerfile`, append 
`--platform=linux/amd64`.
   
   still makes it clear where to put the option, but the content of the file 
can change (e.g. the addition of a `MAINTAINER` line above the first `FROM`) 
without needing to update this part of this README.



##########
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 folder with the correct architecture for the M1. Link to install 
info for docker: https://docs.docker.com/desktop/install/mac-install/  and use 
Install from command line. 
+
+- Then update cdn-in-a-box/traffic_ops Dockerfile line 46 to 
-aarch64/pgdg-redhat-repo-latest.noarch.rpm after EL-${RHEL_VERSION%%.*} 
+- Add on line 18 of the cdn-in-a-box/enroller Dockerfile 
--platform=linux/amd64 after the 1st FROM.
+ 
+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 homebrew install did not work, neither did the Docker.dmg none 
command line install.

Review Comment:
   If the command-line install didn't succeed, why document it in such detail 
here?



##########
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 folder with the correct architecture for the M1. Link to install 
info for docker: https://docs.docker.com/desktop/install/mac-install/  and use 
Install from command line. 
+
+- Then update cdn-in-a-box/traffic_ops Dockerfile line 46 to 
-aarch64/pgdg-redhat-repo-latest.noarch.rpm after EL-${RHEL_VERSION%%.*} 

Review Comment:
   same as above RE line numbers. 



##########
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 folder with the correct architecture for the M1. Link to install 
info for docker: https://docs.docker.com/desktop/install/mac-install/  and use 
Install from command line. 

Review Comment:
   For the best UX for users that need assistive technologies, links should 
have descriptive content instead of raw URLs
   
   ```markdown
   [Like this](https://likethis.com)
   ```



##########
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 folder with the correct architecture for the M1. Link to install 
info for docker: https://docs.docker.com/desktop/install/mac-install/  and use 
Install from command line. 
+
+- Then update cdn-in-a-box/traffic_ops Dockerfile line 46 to 
-aarch64/pgdg-redhat-repo-latest.noarch.rpm after EL-${RHEL_VERSION%%.*} 
+- Add on line 18 of the cdn-in-a-box/enroller Dockerfile 
--platform=linux/amd64 after the 1st FROM.
+ 
+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.

Review Comment:
   Do these instructions differ from the normal instructions on running 
CDN-in-a-Box?



##########
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 folder with the correct architecture for the M1. Link to install 
info for docker: https://docs.docker.com/desktop/install/mac-install/  and use 
Install from command line. 

Review Comment:
   Do you need to go to the "Mac with Apple Silicon" tab on that page to get 
the correct information? If so, you should make the reader aware of that. If 
not, you could directly link to the section instead of naming it: 
https://docs.docker.com/desktop/install/mac-install/#install-from-the-command-line



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to