Browse Source

ugjgjsdjkl;fsjks

master
Your Name 3 years ago
parent
commit
16a67305c2
203 changed files with 18480 additions and 82 deletions
  1. +37
    -0
      2018/Honeywell_T6_Pro/7.tex~
  2. +4
    -0
      2018/Honeywell_T6_Pro/docs/7.aux
  3. +196
    -0
      2018/Honeywell_T6_Pro/docs/7.log
  4. BIN
      2018/Honeywell_T6_Pro/docs/7.pdf
  5. +51
    -0
      2018/Honeywell_T6_Pro/docs/7.tex
  6. +0
    -0
      2018/Honeywell_T6_Pro/docs/Honeywell_T6_Pro_Review.pdf
  7. BIN
      2018/Honeywell_T6_Pro/docs/fin.pdf
  8. +37
    -0
      2018/Honeywell_T6_Pro/docs/start6.tex
  9. BIN
      2018/Running_Conduit/Conduit_Tips.pdf
  10. +4
    -0
      2018/Running_Conduit/docs/4.aux
  11. +199
    -0
      2018/Running_Conduit/docs/4.log
  12. BIN
      2018/Running_Conduit/docs/4.pdf
  13. +85
    -0
      2018/Running_Conduit/docs/4.tex
  14. +77
    -0
      2018/Running_Conduit/docs/4.tex~
  15. +4
    -0
      2018/Running_Conduit/docs/5.aux
  16. +199
    -0
      2018/Running_Conduit/docs/5.log
  17. BIN
      2018/Running_Conduit/docs/5.pdf
  18. +85
    -0
      2018/Running_Conduit/docs/5.tex
  19. +85
    -0
      2018/Running_Conduit/docs/5.tex~
  20. +4
    -0
      2018/Running_Conduit/docs/6.aux
  21. +199
    -0
      2018/Running_Conduit/docs/6.log
  22. BIN
      2018/Running_Conduit/docs/6.pdf
  23. +85
    -0
      2018/Running_Conduit/docs/6.tex
  24. +4
    -0
      2018/Running_Conduit/docs/7.aux
  25. +199
    -0
      2018/Running_Conduit/docs/7.log
  26. BIN
      2018/Running_Conduit/docs/7.pdf
  27. +85
    -0
      2018/Running_Conduit/docs/7.tex
  28. +85
    -0
      2018/Running_Conduit/docs/7.tex~
  29. BIN
      2018/Running_Conduit/docs/fin.pdf
  30. +38
    -37
      2019/AutoSSH_and_Reverse_Proxy_Alternative/docs/2.log
  31. BIN
      2019/AutoSSH_and_Reverse_Proxy_Alternative/docs/2.pdf
  32. +6
    -0
      2019/AutoSSH_and_Reverse_Proxy_Alternative/docs/3.aux
  33. +376
    -0
      2019/AutoSSH_and_Reverse_Proxy_Alternative/docs/3.log
  34. BIN
      2019/AutoSSH_and_Reverse_Proxy_Alternative/docs/3.pdf
  35. +118
    -0
      2019/AutoSSH_and_Reverse_Proxy_Alternative/docs/3.tex
  36. BIN
      2019/AutoSSH_and_Reverse_Proxy_Alternative/docs/fin.pdf
  37. +2
    -2
      2019/Docker_Primer/docs/2.log
  38. BIN
      2019/Docker_Primer/docs/2.pdf
  39. +14
    -0
      2019/Docker_Primer/docs/3.aux
  40. +136
    -0
      2019/Docker_Primer/docs/3.log
  41. BIN
      2019/Docker_Primer/docs/3.pdf
  42. +86
    -0
      2019/Docker_Primer/docs/3.tex
  43. +84
    -0
      2019/Docker_Primer/docs/3.tex~
  44. +13
    -0
      2019/Docker_Primer/docs/3.toc
  45. +14
    -0
      2019/Docker_Primer/docs/4.aux
  46. +243
    -0
      2019/Docker_Primer/docs/4.log
  47. BIN
      2019/Docker_Primer/docs/4.pdf
  48. +111
    -0
      2019/Docker_Primer/docs/4.tex
  49. +86
    -0
      2019/Docker_Primer/docs/4.tex~
  50. +13
    -0
      2019/Docker_Primer/docs/4.toc
  51. +14
    -0
      2019/Docker_Primer/docs/5.aux
  52. +243
    -0
      2019/Docker_Primer/docs/5.log
  53. BIN
      2019/Docker_Primer/docs/5.pdf
  54. +111
    -0
      2019/Docker_Primer/docs/5.tex
  55. +13
    -0
      2019/Docker_Primer/docs/5.toc
  56. +14
    -0
      2019/Docker_Primer/docs/6.aux
  57. +245
    -0
      2019/Docker_Primer/docs/6.log
  58. BIN
      2019/Docker_Primer/docs/6.pdf
  59. +111
    -0
      2019/Docker_Primer/docs/6.tex
  60. +111
    -0
      2019/Docker_Primer/docs/6.tex~
  61. +13
    -0
      2019/Docker_Primer/docs/6.toc
  62. +14
    -0
      2019/Docker_Primer/docs/7.aux
  63. +245
    -0
      2019/Docker_Primer/docs/7.log
  64. BIN
      2019/Docker_Primer/docs/7.pdf
  65. +113
    -0
      2019/Docker_Primer/docs/7.tex
  66. +111
    -0
      2019/Docker_Primer/docs/7.tex~
  67. +13
    -0
      2019/Docker_Primer/docs/7.toc
  68. +15
    -0
      2019/Docker_Primer/docs/8.aux
  69. +245
    -0
      2019/Docker_Primer/docs/8.log
  70. BIN
      2019/Docker_Primer/docs/8.pdf
  71. +119
    -0
      2019/Docker_Primer/docs/8.tex
  72. +113
    -0
      2019/Docker_Primer/docs/8.tex~
  73. +14
    -0
      2019/Docker_Primer/docs/8.toc
  74. BIN
      2019/Docker_Primer/docs/fin.pdf
  75. +8
    -8
      2019/Fail2Ban_Primer/docs/6.log
  76. BIN
      2019/Fail2Ban_Primer/docs/6.pdf
  77. +6
    -0
      2019/Fail2Ban_Primer/docs/7.aux
  78. +359
    -0
      2019/Fail2Ban_Primer/docs/7.log
  79. BIN
      2019/Fail2Ban_Primer/docs/7.pdf
  80. +192
    -0
      2019/Fail2Ban_Primer/docs/7.tex
  81. +5
    -0
      2019/Fail2Ban_Primer/docs/7.toc
  82. BIN
      2019/Fail2Ban_Primer/docs/fin.pdf
  83. +40
    -0
      2019/Mediawiki_Docker_SetupGuide/docs/notes
  84. +1204
    -0
      2019/Mediawiki_Navbox_Setup/code/Common.css
  85. +1265
    -0
      2019/Mediawiki_Navbox_Setup/code/Wikipedia-20191028012859.xml
  86. BIN
      2019/Mediawiki_Navbox_Setup/pics/almostthere.png
  87. BIN
      2019/Mediawiki_Navbox_Setup/pics/done.png
  88. +8
    -0
      2019/RAID_On_Gnulinux_Mdadm_Reference/docs/6.aux
  89. +386
    -0
      2019/RAID_On_Gnulinux_Mdadm_Reference/docs/6.log
  90. BIN
      2019/RAID_On_Gnulinux_Mdadm_Reference/docs/6.pdf
  91. +206
    -0
      2019/RAID_On_Gnulinux_Mdadm_Reference/docs/6.tex
  92. +204
    -0
      2019/RAID_On_Gnulinux_Mdadm_Reference/docs/6.tex~
  93. BIN
      2019/RAID_On_Gnulinux_Mdadm_Reference/docs/fin.pdf
  94. +12
    -0
      2019/Transmission_Primer/docs/10.aux
  95. +292
    -0
      2019/Transmission_Primer/docs/10.log
  96. BIN
      2019/Transmission_Primer/docs/10.pdf
  97. +122
    -0
      2019/Transmission_Primer/docs/10.tex
  98. +11
    -0
      2019/Transmission_Primer/docs/10.toc
  99. +12
    -0
      2019/Transmission_Primer/docs/11.aux
  100. +300
    -0
      2019/Transmission_Primer/docs/11.log

+ 37
- 0
2018/Honeywell_T6_Pro/7.tex~ View File

@ -0,0 +1,37 @@
\documentclass[11pt]{article}
%Gummi|065|=)
\title{\textbf{Work Log: 12/03/18 Honeywell T6 Pro Thermostats}}
\author{}
\date{}
\begin{document}
\maketitle
\emph{"The primary function of the design engineer is to make things
difficult for the fabricator and impossible for the serviceman."}
\section{Overview}
There are 5 Honeywell T6 Pro Thermostats in the Office, which have been installed to replace Google Nest devices. However, they are unable to connect to the wifi. The Nest devices did not have such an issue.
\section{Details}
What was tried:
\begin{itemize}
\item Changing Wifi settings from 2.4GHz and 5Ghz to 2.4GHz only (this was recommended by Honeywell docs, as the thermostats work on 2.4GHz only). I verified the wifi was on 2.4GHz only by restarting all APs, and checking with Wifi Analyzer. No effect.
\item Changing wifi settings to use WPA1 and WPA2 (in case this was a device without WPA2 support). Previously wifi was set to WPA2 only. No effect.
\item Read through all documentation for the Pro T6 thermostats to see if any other settings were required. Nothing of note was found. Documentation is lean. This is my biggest complaint.
\item Attempted to connect T6 to wifi by using Lyric (now honeywell home) app with iphone. Failed to complete.
\item Disabled a setting in the menus called WAC, which is a setting which automatically transfers credentials from an iphone to the T6 thermostat. At this point, I was required to change to the thermostats wifi access point, type in the password for the wifi manually into the Lyric app, where the wifi showed connected and the thermostat even said Success, indicating completion, however the app failed its side of the registration. This got me further, and I saw on the app that it said the Device had done a Geofencing, and had just come back online. However, it was not listed in the devices of the lyric app... Still no luck.
\item At this point, I called support, whom after 30-40 minutes of holding, I was directed by a tech of Resideo to use a phone's wifi hotspot, which should work in this situation (whenever the techs have seen this happen before, this has worked). During the holding time I worked on the network doc for the server rack. He also mentioned that if the device failed to configure like this, that \emph {it was necessary to call up Resideo to delete the device from their servers, as once it is 'half configured' it can't fully be configured.} Wow...
\item I attempted to use a 2nd phone outside of the iphone as the mobile hotspot, and to configure wifi on the Lyric aka Honewell Home app. WAC was enabled. I was able to get about as far as I did with the WAC. The device was able to see wifi, and I could see it connected to my phone... The thermostat even said "Success" and returned to the temperature screen, however the Honeywell Home app did not complete, and gave a failed error (finalizing registration was the last message it tried to complete - often multiple times).
\item I tried once or twice more, but was unsuccessful. At this point, I contacted support again, and while waiting on hold for 30-40 minutes worked with another office on their tech issues. Finally, support recommended I try some of the other thermostats in the office, and also recommended a factory reset. \footnote{(done by holding down the menu button, and then in the window that appears - a service menu - clicking the reset option, then the factory option. Note that this is different from the reset option of the normal menu which doesn't have a factory reset capability... You MUST hold menu down for a few seconds.}
\item I tried on a downstairs thermostat, factory resetting it to new settings and again tried the Access point method. No further progress was made.
\item Pretty much the only thing I didn't try, was to factory reset, disable WAC, and then use the Phone's access point. I also didn't try contractor mode (requires answering an email to complete the app install). I did not try a newer Android phone (my phone is too old / doesn't have Google apps). Overall, the only way to connect to the main wifi was to disable WAC. Connecting to a phone hotspot always worked. Poor Antenna?
Based on this, I have come to the conclusion that these IoT devices, or wifi connected smart things, whatever they may be called, are young technologies and not mature enough to be used without bugs. The Nests, which were from a startup bought by Google, show that this kind of embedded device, with online capability, is new ground, and the space is open for startups to innovate. However, that was 2011, and the big players are now rushing to catch up with their own smart thermostats, cameras, light switches, etc... This means some care must be made with buying the smart devices. Some may be more mature than others.
As for what I think the problem is, it's hard to say, but possibly wifi interference in this business location is causing these home devices to be unable to find the wifi. Or, it's simply faulty hardware. Possibly the iphones (two were tried overall) were unsupported, somehow. That's not acceptable in my view.
I'm not impressed with the Honeywell T6 Pro devices, and the performance here shows it's simply not ready yet.
\end{itemize}
\end{document}

+ 4
- 0
2018/Honeywell_T6_Pro/docs/7.aux View File

@ -0,0 +1,4 @@
\relax
\@writefile{toc}{\contentsline {section}{\numberline {1}Overview}{1}}
\@writefile{toc}{\contentsline {section}{\numberline {2}Details}{1}}
\@writefile{toc}{\contentsline {section}{\numberline {3}End of Year Retrospective}{4}}

+ 196
- 0
2018/Honeywell_T6_Pro/docs/7.log View File

@ -0,0 +1,196 @@
This is pdfTeX, Version 3.14159265-2.6-1.40.17 (TeX Live 2016/Debian) (preloaded format=pdflatex 2019.8.17) 21 JAN 2020 01:20
entering extended mode
restricted \write18 enabled.
%&-line parsing enabled.
**/home/layoutdev/Desktop/code/documentation_general/IT_Articles/2018/Honeywell
_T6_Pro/docs/7.tex
(/home/layoutdev/Desktop/code/documentation_general/IT_Articles/2018/Honeywell_
T6_Pro/docs/7.tex
LaTeX2e <2017/01/01> patch level 3
Babel <3.9r> and hyphenation patterns for 3 language(s) loaded.
(/usr/share/texlive/texmf-dist/tex/latex/base/article.cls
Document Class: article 2014/09/29 v1.4h Standard LaTeX document class
(/usr/share/texlive/texmf-dist/tex/latex/base/size11.clo
File: size11.clo 2014/09/29 v1.4h Standard LaTeX file (size option)
)
\c@part=\count79
\c@section=\count80
\c@subsection=\count81
\c@subsubsection=\count82
\c@paragraph=\count83
\c@subparagraph=\count84
\c@figure=\count85
\c@table=\count86
\abovecaptionskip=\skip41
\belowcaptionskip=\skip42
\bibindent=\dimen102
)
(/usr/share/texlive/texmf-dist/tex/latex/xcolor/xcolor.sty
Package: xcolor 2016/05/11 v2.12 LaTeX color extensions (UK)
(/usr/share/texlive/texmf-dist/tex/latex/graphics-cfg/color.cfg
File: color.cfg 2016/01/02 v1.6 sample color configuration
)
Package xcolor Info: Driver file: pdftex.def on input line 225.
(/usr/share/texlive/texmf-dist/tex/latex/graphics-def/pdftex.def
File: pdftex.def 2017/01/12 v0.06k Graphics/color for pdfTeX
(/usr/share/texlive/texmf-dist/tex/generic/oberdiek/infwarerr.sty
Package: infwarerr 2016/05/16 v1.4 Providing info/warning/error messages (HO)
)
(/usr/share/texlive/texmf-dist/tex/generic/oberdiek/ltxcmds.sty
Package: ltxcmds 2016/05/16 v1.23 LaTeX kernel commands for general use (HO)
)
\Gread@gobject=\count87
)
Package xcolor Info: Model `cmy' substituted by `cmy0' on input line 1348.
Package xcolor Info: Model `hsb' substituted by `rgb' on input line 1352.
Package xcolor Info: Model `RGB' extended on input line 1364.
Package xcolor Info: Model `HTML' substituted by `rgb' on input line 1366.
Package xcolor Info: Model `Hsb' substituted by `hsb' on input line 1367.
Package xcolor Info: Model `tHsb' substituted by `hsb' on input line 1368.
Package xcolor Info: Model `HSB' substituted by `hsb' on input line 1369.
Package xcolor Info: Model `Gray' substituted by `gray' on input line 1370.
Package xcolor Info: Model `wave' substituted by `hsb' on input line 1371.
)
(/usr/share/texlive/texmf-dist/tex/latex/geometry/geometry.sty
Package: geometry 2010/09/12 v5.6 Page Geometry
(/usr/share/texlive/texmf-dist/tex/latex/graphics/keyval.sty
Package: keyval 2014/10/28 v1.15 key=value parser (DPC)
\KV@toks@=\toks14
)
(/usr/share/texlive/texmf-dist/tex/generic/oberdiek/ifpdf.sty
Package: ifpdf 2016/05/14 v3.1 Provides the ifpdf switch
)
(/usr/share/texlive/texmf-dist/tex/generic/oberdiek/ifvtex.sty
Package: ifvtex 2016/05/16 v1.6 Detect VTeX and its facilities (HO)
Package ifvtex Info: VTeX not detected.
)
(/usr/share/texlive/texmf-dist/tex/generic/ifxetex/ifxetex.sty
Package: ifxetex 2010/09/12 v0.6 Provides ifxetex conditional
)
\Gm@cnth=\count88
\Gm@cntv=\count89
\c@Gm@tempcnt=\count90
\Gm@bindingoffset=\dimen103
\Gm@wd@mp=\dimen104
\Gm@odd@mp=\dimen105
\Gm@even@mp=\dimen106
\Gm@layoutwidth=\dimen107
\Gm@layoutheight=\dimen108
\Gm@layouthoffset=\dimen109
\Gm@layoutvoffset=\dimen110
\Gm@dimlist=\toks15
) (./7.aux)
\openout1 = `7.aux'.
LaTeX Font Info: Checking defaults for OML/cmm/m/it on input line 10.
LaTeX Font Info: ... okay on input line 10.
LaTeX Font Info: Checking defaults for T1/cmr/m/n on input line 10.
LaTeX Font Info: ... okay on input line 10.
LaTeX Font Info: Checking defaults for OT1/cmr/m/n on input line 10.
LaTeX Font Info: ... okay on input line 10.
LaTeX Font Info: Checking defaults for OMS/cmsy/m/n on input line 10.
LaTeX Font Info: ... okay on input line 10.
LaTeX Font Info: Checking defaults for OMX/cmex/m/n on input line 10.
LaTeX Font Info: ... okay on input line 10.
LaTeX Font Info: Checking defaults for U/cmr/m/n on input line 10.
LaTeX Font Info: ... okay on input line 10.
(/usr/share/texlive/texmf-dist/tex/context/base/mkii/supp-pdf.mkii
[Loading MPS to PDF converter (version 2006.09.02).]
\scratchcounter=\count91
\scratchdimen=\dimen111
\scratchbox=\box26
\nofMPsegments=\count92
\nofMParguments=\count93
\everyMPshowfont=\toks16
\MPscratchCnt=\count94
\MPscratchDim=\dimen112
\MPnumerator=\count95
\makeMPintoPDFobject=\count96
\everyMPtoPDFconversion=\toks17
)
*geometry* detected driver: dvips
*geometry* verbose mode - [ preamble ] result:
* driver: dvips
* paper: custom
* layout: <same size as paper>
* layoutoffset:(h,v)=(0.0pt,0.0pt)
* vratio: 1:1
* modes:
* h-part:(L,W,R)=(54.2025pt, 325.215pt, 54.2025pt)
* v-part:(T,H,B)=(79.49689pt, 491.43622pt, 79.49689pt)
* \paperwidth=433.62pt
* \paperheight=650.43pt
* \textwidth=325.215pt
* \textheight=491.43622pt
* \oddsidemargin=-18.06749pt
* \evensidemargin=-18.06749pt
* \topmargin=-29.7731pt
* \headheight=12.0pt
* \headsep=25.0pt
* \topskip=11.0pt
* \footskip=30.0pt
* \marginparwidth=59.0pt
* \marginparsep=10.0pt
* \columnsep=10.0pt
* \skip\footins=10.0pt plus 4.0pt minus 2.0pt
* \hoffset=0.0pt
* \voffset=0.0pt
* \mag=1000
* \@twocolumnfalse
* \@twosidefalse
* \@mparswitchfalse
* \@reversemarginfalse
* (1in=72.27pt=25.4mm, 1cm=28.453pt)
LaTeX Font Info: External font `cmex10' loaded for size
(Font) <12> on input line 12.
LaTeX Font Info: External font `cmex10' loaded for size
(Font) <8> on input line 12.
LaTeX Font Info: External font `cmex10' loaded for size
(Font) <6> on input line 12.
LaTeX Font Info: Try loading font information for OMS+cmr on input line 25.
(/usr/share/texlive/texmf-dist/tex/latex/base/omscmr.fd
File: omscmr.fd 2014/09/29 v2.5h Standard LaTeX font definitions
)
LaTeX Font Info: Font shape `OMS/cmr/m/n' in size <10.95> not available
(Font) Font shape `OMS/cmsy/m/n' tried instead on input line 25.
[1
Non-PDF special ignored!
{/var/lib/texmf/fonts/map/pdftex/updmap/pdftex.map}]
LaTeX Font Info: External font `cmex10' loaded for size
(Font) <10.95> on input line 32.
LaTeX Font Info: External font `cmex10' loaded for size
(Font) <9> on input line 32.
LaTeX Font Info: External font `cmex10' loaded for size
(Font) <5> on input line 32.
[2] [3] [4] (./7.aux) )
Here is how much of TeX's memory you used:
1959 strings out of 494945
25794 string characters out of 6181032
91878 words of memory out of 5000000
5280 multiletter control sequences out of 15000+600000
9761 words of font info for 34 fonts, out of 8000000 for 9000
14 hyphenation exceptions out of 8191
24i,8n,35p,747b,216s stack positions out of 5000i,500n,10000p,200000b,80000s
</usr/share/texlive/texmf-dist/fonts/type1/public/amsfon
ts/cm/cmbx12.pfb></usr/share/texlive/texmf-dist/fonts/type1/public/amsfonts/cm/
cmr10.pfb></usr/share/texlive/texmf-dist/fonts/type1/public/amsfonts/cm/cmr6.pf
b></usr/share/texlive/texmf-dist/fonts/type1/public/amsfonts/cm/cmr8.pfb></usr/
share/texlive/texmf-dist/fonts/type1/public/amsfonts/cm/cmr9.pfb></usr/share/te
xlive/texmf-dist/fonts/type1/public/amsfonts/cm/cmsy10.pfb></usr/share/texlive/
texmf-dist/fonts/type1/public/amsfonts/cm/cmti10.pfb>
Output written on 7.pdf (4 pages, 93365 bytes).
PDF statistics:
45 PDF objects out of 1000 (max. 8388607)
31 compressed objects within 1 object stream
0 named destinations out of 1000 (max. 500000)
1 words of extra memory for PDF output out of 10000 (max. 10000000)

BIN
2018/Honeywell_T6_Pro/docs/7.pdf View File


+ 51
- 0
2018/Honeywell_T6_Pro/docs/7.tex View File

@ -0,0 +1,51 @@
\documentclass[11pt]{article}
%Gummi|065|=)
\usepackage{xcolor}
\usepackage[vcentering,dvips]{geometry}
\geometry{papersize={6in,9in},total={4.5in,6.8in}}
\title{\textbf{Work Log: 12/03/18 Honeywell T6 Pro Thermostats}}
\author{}
\date{}
\begin{document}
\maketitle
\emph{"The primary function of the design engineer is to make things
difficult for the fabricator and impossible for the serviceman."}
\textcolor{green!60!blue!70}{
\section{Overview}}
There are 5 Honeywell T6 Pro Thermostats in the Office, which have been installed to replace Google Nest devices. However, they are unable to connect to the wifi. The Nest devices did not have such an issue.
\textcolor{green!60!blue!70}{
\section{Details}}
What was tried:
\begin{itemize}
\item Changing Wifi settings from 2.4GHz and 5Ghz to 2.4GHz only (this was recommended by Honeywell docs, as the thermostats work on 2.4GHz only). I verified the wifi was on 2.4GHz only by restarting all APs, and checking with Wifi Analyzer. No effect.
\item Changing wifi settings to use WPA1 and WPA2 (in case this was a device without WPA2 support). Previously wifi was set to WPA2 only. No effect.
\item Read through all documentation for the Pro T6 thermostats to see if any other settings were required. Nothing of note was found. Documentation is lean. This is my biggest complaint.
\item Attempted to connect T6 to wifi by using Lyric (now honeywell home) app with iphone. Failed to complete.
\item Disabled a setting in the menus called WAC, which is a setting which automatically transfers credentials from an iphone to the T6 thermostat. At this point, I was required to change to the thermostats wifi access point, type in the password for the wifi manually into the Lyric app, where the wifi showed connected and the thermostat even said Success, indicating completion, however the app failed its side of the registration. This got me further, and I saw on the app that it said the Device had done a Geofencing, and had just come back online. However, it was not listed in the devices of the lyric app... Still no luck.
\item At this point, I called support, whom after 30-40 minutes of holding, I was directed by a tech of Resideo to use a phone's wifi hotspot, which should work in this situation (whenever the techs have seen this happen before, this has worked). During the holding time I worked on the network doc for the server rack. He also mentioned that if the device failed to configure like this, that \emph {it was necessary to call up Resideo to delete the device from their servers, as once it is 'half configured' it can't fully be configured.} Wow...
\item I attempted to use a 2nd phone outside of the iphone as the mobile hotspot, and to configure wifi on the Lyric aka Honewell Home app. WAC was enabled. I was able to get about as far as I did with the WAC. The device was able to see wifi, and I could see it connected to my phone... The thermostat even said "Success" and returned to the temperature screen, however the Honeywell Home app did not complete, and gave a failed error (finalizing registration was the last message it tried to complete - often multiple times).
\item I tried once or twice more, but was unsuccessful. At this point, I contacted support again, and while waiting on hold for 30-40 minutes worked with another office on their tech issues. Finally, support recommended I try some of the other thermostats in the office, and also recommended a factory reset. \footnote{(done by holding down the menu button, and then in the window that appears - a service menu - clicking the reset option, then the factory option. Note that this is different from the reset option of the normal menu which doesn't have a factory reset capability... You MUST hold menu down for a few seconds.}
\item I tried on a downstairs thermostat, factory resetting it to new settings and again tried the Access point method. No further progress was made.
\item Pretty much the only thing I didn't try, was to factory reset, disable WAC, and then use the Phone's access point. I also didn't try contractor mode (requires answering an email to complete the app install). I did not try a newer Android phone (my phone is too old / doesn't have Google apps). Overall, the only way to connect to the main wifi was to disable WAC. Connecting to a phone hotspot always worked. Poor Antenna?
Based on this, I have come to the conclusion that these IoT devices, or wifi connected smart things, whatever they may be called, are young technologies and not mature enough to be used without bugs. The Nests, which were from a startup bought by Google, show that this kind of embedded device, with online capability, is new ground, and the space is open for startups to innovate. However, that was 2011, and the big players are now rushing to catch up with their own smart thermostats, cameras, light switches, etc... This means some care must be made with buying the smart devices. Some may be more mature than others.
As for what I think the problem is, it's hard to say, but possibly wifi interference in this business location is causing these home devices to be unable to find the wifi. Or, it's simply faulty hardware. Possibly the iphones (two were tried overall) were unsupported, somehow. That's not acceptable in my view.
I'm not impressed with the Honeywell T6 Pro devices, and the performance here shows it's simply not ready yet.
\end{itemize}
\textcolor{green!60!blue!70}{
\section{End of Year Retrospective}}
Early IoT attempts. They can't all be winners. It's deceiving to see a large brand name on something like this, and think there is anything more than a small group of engineers behind it. I think when I called into their support I was probably talking to the engineers.
\end{document}

2018/Honeywell_T6_Pro_Review.pdf → 2018/Honeywell_T6_Pro/docs/Honeywell_T6_Pro_Review.pdf View File


BIN
2018/Honeywell_T6_Pro/docs/fin.pdf View File


+ 37
- 0
2018/Honeywell_T6_Pro/docs/start6.tex View File

@ -0,0 +1,37 @@
\documentclass[11pt]{article}
%Gummi|065|=)
\title{\textbf{Work Log: 12/03/18 Honeywell T6 Pro Thermostats}}
\author{}
\date{}
\begin{document}
\maketitle
\emph{"The primary function of the design engineer is to make things
difficult for the fabricator and impossible for the serviceman."}
\section{Overview}
There are 5 Honeywell T6 Pro Thermostats in the Office, which have been installed to replace Google Nest devices. However, they are unable to connect to the wifi. The Nest devices did not have such an issue.
\section{Details}
What was tried:
\begin{itemize}
\item Changing Wifi settings from 2.4GHz and 5Ghz to 2.4GHz only (this was recommended by Honeywell docs, as the thermostats work on 2.4GHz only). I verified the wifi was on 2.4GHz only by restarting all APs, and checking with Wifi Analyzer. No effect.
\item Changing wifi settings to use WPA1 and WPA2 (in case this was a device without WPA2 support). Previously wifi was set to WPA2 only. No effect.
\item Read through all documentation for the Pro T6 thermostats to see if any other settings were required. Nothing of note was found. Documentation is lean. This is my biggest complaint.
\item Attempted to connect T6 to wifi by using Lyric (now honeywell home) app with iphone. Failed to complete.
\item Disabled a setting in the menus called WAC, which is a setting which automatically transfers credentials from an iphone to the T6 thermostat. At this point, I was required to change to the thermostats wifi access point, type in the password for the wifi manually into the Lyric app, where the wifi showed connected and the thermostat even said Success, indicating completion, however the app failed its side of the registration. This got me further, and I saw on the app that it said the Device had done a Geofencing, and had just come back online. However, it was not listed in the devices of the lyric app... Still no luck.
\item At this point, I called support, whom after 30-40 minutes of holding, I was directed by a tech of Resideo to use a phone's wifi hotspot, which should work in this situation (whenever the techs have seen this happen before, this has worked). During the holding time I worked on the network doc for the server rack. He also mentioned that if the device failed to configure like this, that \emph {it was necessary to call up Resideo to delete the device from their servers, as once it is 'half configured' it can't fully be configured.} Wow...
\item I attempted to use a 2nd phone outside of the iphone as the mobile hotspot, and to configure wifi on the Lyric aka Honewell Home app. WAC was enabled. I was able to get about as far as I did with the WAC. The device was able to see wifi, and I could see it connected to my phone... The thermostat even said "Success" and returned to the temperature screen, however the Honeywell Home app did not complete, and gave a failed error (finalizing registration was the last message it tried to complete - often multiple times).
\item I tried once or twice more, but was unsuccessful. At this point, I contacted support again, and while waiting on hold for 30-40 minutes worked with another office on their tech issues. Finally, support recommended I try some of the other thermostats in the office, and also recommended a factory reset. \footnote{(done by holding down the menu button, and then in the window that appears - a service menu - clicking the reset option, then the factory option. Note that this is different from the reset option of the normal menu which doesn't have a factory reset capability... You MUST hold menu down for a few seconds.}
\item I tried on a downstairs thermostat, factory resetting it to new settings and again tried the Access point method. No further progress was made.
\item Pretty much the only thing I didn't try, was to factory reset, disable WAC, and then use the Phone's access point. I also didn't try contractor mode (requires answering an email to complete the app install). I did not try a newer Android phone (my phone is too old / doesn't have Google apps). Overall, the only way to connect to the main wifi was to disable WAC. Connecting to a phone hotspot always worked. Poor Antenna?
Based on this, I have come to the conclusion that these IoT devices, or wifi connected smart things, whatever they may be called, are young technologies and not mature enough to be used without bugs. The Nests, which were from a startup bought by Google, show that this kind of embedded device, with online capability, is new ground, and the space is open for startups to innovate. However, that was 2011, and the big players are now rushing to catch up with their own smart thermostats, cameras, light switches, etc... This means some care must be made with buying the smart devices. Some may be more mature than others.
As for what I think the problem is, it's hard to say, but possibly wifi interference in this business location is causing these home devices to be unable to find the wifi. Or, it's simply faulty hardware. Possibly the iphones (two were tried overall) were unsupported, somehow. That's not acceptable in my view.
I'm not impressed with the Honeywell T6 Pro devices, and the performance here shows it's simply not ready yet.
\end{itemize}
\end{document}

BIN
2018/Running_Conduit/Conduit_Tips.pdf View File


+ 4
- 0
2018/Running_Conduit/docs/4.aux View File

@ -0,0 +1,4 @@
\relax
\@writefile{toc}{\contentsline {section}{\numberline {1}Overview}{1}}
\@writefile{toc}{\contentsline {section}{\numberline {2}Conduit}{1}}
\@writefile{toc}{\contentsline {section}{\numberline {3}End of Year Review}{4}}

+ 199
- 0
2018/Running_Conduit/docs/4.log View File

@ -0,0 +1,199 @@
This is pdfTeX, Version 3.14159265-2.6-1.40.17 (TeX Live 2016/Debian) (preloaded format=pdflatex 2019.8.17) 15 DEC 2019 20:02
entering extended mode
restricted \write18 enabled.
%&-line parsing enabled.
**/home/layoutdev/Desktop/code/documentation_general/IT_Articles/2018/Running_C
onduit/docs/4.tex
(/home/layoutdev/Desktop/code/documentation_general/IT_Articles/2018/Running_Co
nduit/docs/4.tex
LaTeX2e <2017/01/01> patch level 3
Babel <3.9r> and hyphenation patterns for 3 language(s) loaded.
(/usr/share/texlive/texmf-dist/tex/latex/base/article.cls
Document Class: article 2014/09/29 v1.4h Standard LaTeX document class
(/usr/share/texlive/texmf-dist/tex/latex/base/size11.clo
File: size11.clo 2014/09/29 v1.4h Standard LaTeX file (size option)
)
\c@part=\count79
\c@section=\count80
\c@subsection=\count81
\c@subsubsection=\count82
\c@paragraph=\count83
\c@subparagraph=\count84
\c@figure=\count85
\c@table=\count86
\abovecaptionskip=\skip41
\belowcaptionskip=\skip42
\bibindent=\dimen102
)
(/usr/share/texlive/texmf-dist/tex/latex/xcolor/xcolor.sty
Package: xcolor 2016/05/11 v2.12 LaTeX color extensions (UK)
(/usr/share/texlive/texmf-dist/tex/latex/graphics-cfg/color.cfg
File: color.cfg 2016/01/02 v1.6 sample color configuration
)
Package xcolor Info: Driver file: pdftex.def on input line 225.
(/usr/share/texlive/texmf-dist/tex/latex/graphics-def/pdftex.def
File: pdftex.def 2017/01/12 v0.06k Graphics/color for pdfTeX
(/usr/share/texlive/texmf-dist/tex/generic/oberdiek/infwarerr.sty
Package: infwarerr 2016/05/16 v1.4 Providing info/warning/error messages (HO)
)
(/usr/share/texlive/texmf-dist/tex/generic/oberdiek/ltxcmds.sty
Package: ltxcmds 2016/05/16 v1.23 LaTeX kernel commands for general use (HO)
)
\Gread@gobject=\count87
)
Package xcolor Info: Model `cmy' substituted by `cmy0' on input line 1348.
Package xcolor Info: Model `hsb' substituted by `rgb' on input line 1352.
Package xcolor Info: Model `RGB' extended on input line 1364.
Package xcolor Info: Model `HTML' substituted by `rgb' on input line 1366.
Package xcolor Info: Model `Hsb' substituted by `hsb' on input line 1367.
Package xcolor Info: Model `tHsb' substituted by `hsb' on input line 1368.
Package xcolor Info: Model `HSB' substituted by `hsb' on input line 1369.
Package xcolor Info: Model `Gray' substituted by `gray' on input line 1370.
Package xcolor Info: Model `wave' substituted by `hsb' on input line 1371.
)
(/usr/share/texlive/texmf-dist/tex/latex/geometry/geometry.sty
Package: geometry 2010/09/12 v5.6 Page Geometry
(/usr/share/texlive/texmf-dist/tex/latex/graphics/keyval.sty
Package: keyval 2014/10/28 v1.15 key=value parser (DPC)
\KV@toks@=\toks14
)
(/usr/share/texlive/texmf-dist/tex/generic/oberdiek/ifpdf.sty
Package: ifpdf 2016/05/14 v3.1 Provides the ifpdf switch
)
(/usr/share/texlive/texmf-dist/tex/generic/oberdiek/ifvtex.sty
Package: ifvtex 2016/05/16 v1.6 Detect VTeX and its facilities (HO)
Package ifvtex Info: VTeX not detected.
)
(/usr/share/texlive/texmf-dist/tex/generic/ifxetex/ifxetex.sty
Package: ifxetex 2010/09/12 v0.6 Provides ifxetex conditional
)
\Gm@cnth=\count88
\Gm@cntv=\count89
\c@Gm@tempcnt=\count90
\Gm@bindingoffset=\dimen103
\Gm@wd@mp=\dimen104
\Gm@odd@mp=\dimen105
\Gm@even@mp=\dimen106
\Gm@layoutwidth=\dimen107
\Gm@layoutheight=\dimen108
\Gm@layouthoffset=\dimen109
\Gm@layoutvoffset=\dimen110
\Gm@dimlist=\toks15
) (./4.aux)
\openout1 = `4.aux'.
LaTeX Font Info: Checking defaults for OML/cmm/m/it on input line 9.
LaTeX Font Info: ... okay on input line 9.
LaTeX Font Info: Checking defaults for T1/cmr/m/n on input line 9.
LaTeX Font Info: ... okay on input line 9.
LaTeX Font Info: Checking defaults for OT1/cmr/m/n on input line 9.
LaTeX Font Info: ... okay on input line 9.
LaTeX Font Info: Checking defaults for OMS/cmsy/m/n on input line 9.
LaTeX Font Info: ... okay on input line 9.
LaTeX Font Info: Checking defaults for OMX/cmex/m/n on input line 9.
LaTeX Font Info: ... okay on input line 9.
LaTeX Font Info: Checking defaults for U/cmr/m/n on input line 9.
LaTeX Font Info: ... okay on input line 9.
(/usr/share/texlive/texmf-dist/tex/context/base/mkii/supp-pdf.mkii
[Loading MPS to PDF converter (version 2006.09.02).]
\scratchcounter=\count91
\scratchdimen=\dimen111
\scratchbox=\box26
\nofMPsegments=\count92
\nofMParguments=\count93
\everyMPshowfont=\toks16
\MPscratchCnt=\count94
\MPscratchDim=\dimen112
\MPnumerator=\count95
\makeMPintoPDFobject=\count96
\everyMPtoPDFconversion=\toks17
)
*geometry* detected driver: dvips
*geometry* verbose mode - [ preamble ] result:
* driver: dvips
* paper: custom
* layout: <same size as paper>
* layoutoffset:(h,v)=(0.0pt,0.0pt)
* vratio: 1:1
* modes:
* h-part:(L,W,R)=(54.2025pt, 325.215pt, 54.2025pt)
* v-part:(T,H,B)=(79.49689pt, 491.43622pt, 79.49689pt)
* \paperwidth=433.62pt
* \paperheight=650.43pt
* \textwidth=325.215pt
* \textheight=491.43622pt
* \oddsidemargin=-18.06749pt
* \evensidemargin=-18.06749pt
* \topmargin=-29.7731pt
* \headheight=12.0pt
* \headsep=25.0pt
* \topskip=11.0pt
* \footskip=30.0pt
* \marginparwidth=59.0pt
* \marginparsep=10.0pt
* \columnsep=10.0pt
* \skip\footins=10.0pt plus 4.0pt minus 2.0pt
* \hoffset=0.0pt
* \voffset=0.0pt
* \mag=1000
* \@twocolumnfalse
* \@twosidefalse
* \@mparswitchfalse
* \@reversemarginfalse
* (1in=72.27pt=25.4mm, 1cm=28.453pt)
LaTeX Font Info: External font `cmex10' loaded for size
(Font) <12> on input line 11.
LaTeX Font Info: External font `cmex10' loaded for size
(Font) <8> on input line 11.
LaTeX Font Info: External font `cmex10' loaded for size
(Font) <6> on input line 11.
LaTeX Font Info: External font `cmex10' loaded for size
(Font) <10.95> on input line 16.
LaTeX Font Info: External font `cmex10' loaded for size
(Font) <9> on input line 16.
LaTeX Font Info: External font `cmex10' loaded for size
(Font) <5> on input line 16.
Underfull \hbox (badness 10000) in paragraph at lines 22--24
[]
Underfull \hbox (badness 10000) in paragraph at lines 25--27
[]
[1
Non-PDF special ignored!
{/var/lib/texmf/fonts/map/pdftex/updmap/pdftex.map}]
[2] [3] [4] (./4.aux) )
Here is how much of TeX's memory you used:
1942 strings out of 494945
25496 string characters out of 6181032
90870 words of memory out of 5000000
5266 multiletter control sequences out of 15000+600000
9723 words of font info for 34 fonts, out of 8000000 for 9000
14 hyphenation exceptions out of 8191
24i,8n,35p,923b,189s stack positions out of 5000i,500n,10000p,200000b,80000s
</usr/share/texlive/texmf-dist/fonts/type1/public/amsfon
ts/cm/cmbx10.pfb></usr/share/texlive/texmf-dist/fonts/type1/public/amsfonts/cm/
cmbx12.pfb></usr/share/texlive/texmf-dist/fonts/type1/public/amsfonts/cm/cmr10.
pfb></usr/share/texlive/texmf-dist/fonts/type1/public/amsfonts/cm/cmr12.pfb></u
sr/share/texlive/texmf-dist/fonts/type1/public/amsfonts/cm/cmr6.pfb></usr/share
/texlive/texmf-dist/fonts/type1/public/amsfonts/cm/cmr8.pfb></usr/share/texlive
/texmf-dist/fonts/type1/public/amsfonts/cm/cmr9.pfb>
Output written on 4.pdf (4 pages, 93684 bytes).
PDF statistics:
45 PDF objects out of 1000 (max. 8388607)
31 compressed objects within 1 object stream
0 named destinations out of 1000 (max. 500000)
1 words of extra memory for PDF output out of 10000 (max. 10000000)

BIN
2018/Running_Conduit/docs/4.pdf View File


+ 85
- 0
2018/Running_Conduit/docs/4.tex View File

@ -0,0 +1,85 @@
\documentclass[11pt]{article}
%Gummi|065|=)
\usepackage{xcolor}
\usepackage[vcentering,dvips]{geometry}
\geometry{papersize={6in,9in},total={4.5in,6.8in}}
\title{\textbf{Running Conduit - Tips}}
\author{Steak Electronics}
\date{}
\begin{document}
\maketitle
\textcolor{green!60!blue!70}{
\section{Overview}}
I recently took up running conduit for cable runs at the office. Here it's used for ethernet runs: CCTV, IoT, or general LANs. Here's what I learned early on.\footnote{Of course you can run mains through conduit, but I'll cover that later. Start with low voltage wiring.}
\textcolor{green!60!blue!70}{
\section{Conduit}}
Here are some general tips on Conduit:
\\
\textbf{Where conduit is hard:} Adding cabling to existing conduit, doing unusual bends, using thicker pipes (harder to bend)
\\
\textbf{Where conduit is easy:} The opposite: Cabling as you put up the conduit, doing only straight runs, 90 degree bends, and offset bends, and using 1/2" (smaller) conduit.
\vspace{0.2in}\textcolor{green!60!blue!70}{
\LARGE \textbf{Types of Pipe} \normalsize}
\vspace{0.2in}
There are different kinds of conduit, based on the size of the pipe. The price increases with size.
\vspace{0.2in}
1/2" pipe is good for one or two ethernet runs.
3/4" pipe is good for 3 ethernet cables.
1" pipe can run say, 6 ethernet cables.
\vspace{0.2in}
Now, you can get away with more, but it's best to underspec, so you have room in case of future expansion. However, it's recommended to not add additional cables to the conduit afterwards, and instead use ethernet switches.
\vspace{0.2in}\textcolor{green!60!blue!70}{
\LARGE \textbf{How to Fish Conduit} \normalsize}
\vspace{0.2in}
Ethernet cable should be led through conduit with steel fish tape. You can't use nylon string on existing conduit, unless you are going through small sections of straight conduit - fishing the string as you put up the conduit (new installs). For existing installs, or if you already put up some conduit and just need to get the wire through, use steel fish tape. The steel, allows you to pull AND push the ethernet cable, should it get stuck. However, let me say this: \textbf{fish the cable through each piece of conduit you put up as you go}. It's faster, and easier. This also means that future expansion is not nearly as practical.
\vspace{0.2in}\textcolor{green!60!blue!70}{
\LARGE \textbf{Couplers} \normalsize}
\vspace{0.2in}
The ideal coupler has the pipes inside sitting flush against each other, but some couplers have a notch in the middle between them. Those aren't as good, as the notch is a gap where ethernet cable will catch when pulling through. Not an issue if you cable as you go, but a problem for running cable through existing conduit.
\vspace{0.2in}\textcolor{green!60!blue!70}{
\LARGE \textbf{Boxes} \normalsize}
\vspace{0.2in}
Use the deeper, larger electrical boxes. They usually come in a few sizes. The additional space, makes everything easier. Use frequent boxes if you plan to expand more cables later, so you can access everything inside. Use boxes where you will have an ethernet switch or outlet, or need to branch out...
\vspace{0.2in}\textcolor{green!60!blue!70}{
\LARGE \textbf{Bendy Conduit} \normalsize}
\vspace{0.2in}
Bendable or Bendy conduit\footnote{There are a couple different kinds of this, and its something I'm still figuring out.} is sized one size bigger than it's listed. So if you buy 3/4" conduit, you get a 1" size bendable pipe, with 1/4" the bendy part. This means you must size boxes accordingly. Supposedly, you must buy the specific bendy conduit connectors, but you can fit a 3/4" bendy conduit, in a 1" hole in an electrical box in a pinch. You can also use a coupler (for standard pipe) sized one size bigger, in a pinch. Not as professional looking, but it works.
\vspace{0.2in}\textcolor{green!60!blue!70}{
\LARGE \textbf{Grease} \normalsize}
\vspace{0.2in}
They sell grease, but its a mess, and I wouldn't use it. Not only will it get all inside the pipe, but all over your hands as you pull the wire through. You shouldn't run new wires through existing conduit. One of the problems is that you might wrap the ethernet cable in electrical tape, but tape is rubber, and sticks to the metal. What you want is some kind of slidy, metal surface that doesn't stick to metal on the front of the ethernet cable.
\vspace{0.2in}\textcolor{green!60!blue!70}{
\LARGE \textbf{Fish Tape and Plastic Ends} \normalsize}
\vspace{0.2in}
There is a little piece of plastic on my fish tape at the end. When running through existing small conduit, that plastic is a problem, as it hits wires, and couplers, catching. Solution: Remove the plastic piece. However, there are times when you want something plastic at the end of the metal fish tape. I.e. when you are running fish tape through the bendable conduit. In that case, put some electrical tape at the end of the conduit. This little trick can be the difference between barely fishing, and not getting through the pipe. The idea is, it's removable depending on your need. This is primarily for fishing through existing conduit. Again, you can't use nylon string to pull wire through conduit, you need metal fish tape. That is because metal fish tape can be pushed back and forth, but nylon string can only pull.
\textcolor{green!60!blue!70}{
\section{End of Year Review}}
Being a maintenance / IT / electronics engineer at my company, I get to wear a lot of hats, and conduit is one of them. I'm about to run some new conduit, and a few things make it easier, which I learned already. Use the smaller conduits. For awkward turns and bends use bendable conduit. Don't waste time trying complex bends on small runs. Light switches can always go before an outlet to control it on/off. This means you can have as many on/off switches you want. 120V Mains and conduit are easy if you are an EE, but I will cover this is a later document.
\end{document}

+ 77
- 0
2018/Running_Conduit/docs/4.tex~ View File

@ -0,0 +1,77 @@
\documentclass[11pt]{article}
%Gummi|065|=)
\title{\textbf{Running Conduit - Tips}}
\author{Steak Electronics}
\date{}
\begin{document}
\maketitle
\section{Overview}
I recently took up running conduit for cable runs at the office. This is used for ethernet runs: CCTV, IoT, or general LANs. Here's what I learned early on.
\section{Conduit}
Here's general tips on Conduit:
\textbf{Where conduit is hard:} Adding cabling to existing conduit, doing unusual bends, using thicker pipes (harder to bend)
\textbf{Where conduit is easy:} The opposite: Cabling as you put up the conduit, doing only straight runs, 90 degree bends, and offset bends, and using 1/2" conduit.
\vspace{0.2in}
\LARGE \textbf{Types of Pipe} \normalsize
\vspace{0.2in}
There are different kinds of conduit, based on the size of the pipe. The price increases with size.
\vspace{0.2in}
1/2" pipe is good for one or two ethernet runs.
3/4" pipe is good for 3 ethernet cables.
1" pipe can run say, 6 ethernet cables.
\vspace{0.2in}
Now, you can get away with more, but it's best to underspec, so you have room in case of future expansion. However, it's recommended to not add additional cables to the conduit afterwards, and instead use ethernet switches.
\vspace{0.2in}
\LARGE \textbf{How to Fish Conduit} \normalsize
\vspace{0.2in}
Ethernet cable should be led through conduit with steel fish tape. You can't use nylon string on existing conduit, unless you are going through small sections of straight conduit - fishing the string as you put up the conduit (new installs). For existing installs, or if you already put up some conduit and just need to get the wire through, use steel fish tape. The steel, allows you to pull AND push the ethernet cable, should it get stuck. However, let me say this: \textbf{fish the cable through each piece of conduit you put up as you go}. It's faster, and easier. This also means that future expansion is not nearly as practical.
\vspace{0.2in}
\LARGE \textbf{Couplers} \normalsize
\vspace{0.2in}
The ideal coupler has the pipes inside sitting flush against each other, but some couplers have a notch in the middle between them. Those aren't as good, as the notch is a gap where ethernet cable will catch when pulling through. Not an issue if you cable as you go, but a problem for running cable through existing conduit.
\vspace{0.2in}
\LARGE \textbf{Boxes} \normalsize
\vspace{0.2in}
Use the deeper, larger electrical boxes. They usually come in a few sizes. The additional space, makes everything easier. Use frequent boxes if you plan to expand more cables later, so you can access everything inside. Use boxes where you will have an ethernet switch or outlet, or need to branch out...
\vspace{0.2in}
\LARGE \textbf{Bendy Conduit} \normalsize
\vspace{0.2in}
Bendable or Bendy conduit is sized one size bigger than it's listed. So if you buy 3/4" conduit, you get a 1" size bendable pipe, with 1/4" the bendy part. This means you must size boxes accordingly. Supposedly, you must buy the specific bendy conduit connectors, but you can fit a 3/4" bendy conduit, in a 1" hole in an electrical box in a pinch. You can also use a coupler (for standard pipe) sized one size bigger, in a pinch. Not as professional looking, but it works.
\vspace{0.2in}
\LARGE \textbf{Grease} \normalsize
\vspace{0.2in}
They sell grease, but its a mess, and I wouldn't use it. Not only will it get all inside the pipe, but all over your hands as you pull the wire through. You shouldn't run new wires through existing conduit. One of the problems is that you might wrap the ethernet cable in electrical tape, but tape is rubber, and sticks to the metal. What you want is some kind of slidy, metal surface that doesn't stick to metal on the front of the ethernet cable.
\vspace{0.2in}
\LARGE \textbf{Fish Tape and Plastic Ends} \normalsize
\vspace{0.2in}
There is a little piece of plastic on my fish tape at the end. When running through existing small conduit, that plastic is a problem, as it hits wires, and couplers, catching. Solution: Remove the plastic piece. However, there are times when you want something plastic at the end of the metal fish tape. I.e. when you are running fish tape through the bendable conduit. In that case, put some electrical tape at the end of the conduit. This little trick can be the difference between barely fishing, and not getting through the pipe. The idea is, it's removable depending on your need. This is primarily for fishing through existing conduit. Again, you can't use nylon string to pull wire through conduit, you need metal fish tape. That is because metal fish tape can be pushed back and forth, but nylon string can only pull.
\end{document}

+ 4
- 0
2018/Running_Conduit/docs/5.aux View File

@ -0,0 +1,4 @@
\relax
\@writefile{toc}{\contentsline {section}{\numberline {1}Overview}{1}}
\@writefile{toc}{\contentsline {section}{\numberline {2}Conduit}{1}}
\@writefile{toc}{\contentsline {section}{\numberline {3}End of Year Review}{4}}

+ 199
- 0
2018/Running_Conduit/docs/5.log View File

@ -0,0 +1,199 @@
This is pdfTeX, Version 3.14159265-2.6-1.40.17 (TeX Live 2016/Debian) (preloaded format=pdflatex 2019.8.17) 17 JAN 2020 20:37
entering extended mode
restricted \write18 enabled.
%&-line parsing enabled.
**/home/layoutdev/Desktop/code/documentation_general/IT_Articles/2018/Running_C
onduit/docs/5.tex
(/home/layoutdev/Desktop/code/documentation_general/IT_Articles/2018/Running_Co
nduit/docs/5.tex
LaTeX2e <2017/01/01> patch level 3
Babel <3.9r> and hyphenation patterns for 3 language(s) loaded.
(/usr/share/texlive/texmf-dist/tex/latex/base/article.cls
Document Class: article 2014/09/29 v1.4h Standard LaTeX document class
(/usr/share/texlive/texmf-dist/tex/latex/base/size11.clo
File: size11.clo 2014/09/29 v1.4h Standard LaTeX file (size option)
)
\c@part=\count79
\c@section=\count80
\c@subsection=\count81
\c@subsubsection=\count82
\c@paragraph=\count83
\c@subparagraph=\count84
\c@figure=\count85
\c@table=\count86
\abovecaptionskip=\skip41
\belowcaptionskip=\skip42
\bibindent=\dimen102
)
(/usr/share/texlive/texmf-dist/tex/latex/xcolor/xcolor.sty
Package: xcolor 2016/05/11 v2.12 LaTeX color extensions (UK)
(/usr/share/texlive/texmf-dist/tex/latex/graphics-cfg/color.cfg
File: color.cfg 2016/01/02 v1.6 sample color configuration
)
Package xcolor Info: Driver file: pdftex.def on input line 225.
(/usr/share/texlive/texmf-dist/tex/latex/graphics-def/pdftex.def
File: pdftex.def 2017/01/12 v0.06k Graphics/color for pdfTeX
(/usr/share/texlive/texmf-dist/tex/generic/oberdiek/infwarerr.sty
Package: infwarerr 2016/05/16 v1.4 Providing info/warning/error messages (HO)
)
(/usr/share/texlive/texmf-dist/tex/generic/oberdiek/ltxcmds.sty
Package: ltxcmds 2016/05/16 v1.23 LaTeX kernel commands for general use (HO)
)
\Gread@gobject=\count87
)
Package xcolor Info: Model `cmy' substituted by `cmy0' on input line 1348.
Package xcolor Info: Model `hsb' substituted by `rgb' on input line 1352.
Package xcolor Info: Model `RGB' extended on input line 1364.
Package xcolor Info: Model `HTML' substituted by `rgb' on input line 1366.
Package xcolor Info: Model `Hsb' substituted by `hsb' on input line 1367.
Package xcolor Info: Model `tHsb' substituted by `hsb' on input line 1368.
Package xcolor Info: Model `HSB' substituted by `hsb' on input line 1369.
Package xcolor Info: Model `Gray' substituted by `gray' on input line 1370.
Package xcolor Info: Model `wave' substituted by `hsb' on input line 1371.
)
(/usr/share/texlive/texmf-dist/tex/latex/geometry/geometry.sty
Package: geometry 2010/09/12 v5.6 Page Geometry
(/usr/share/texlive/texmf-dist/tex/latex/graphics/keyval.sty
Package: keyval 2014/10/28 v1.15 key=value parser (DPC)
\KV@toks@=\toks14
)
(/usr/share/texlive/texmf-dist/tex/generic/oberdiek/ifpdf.sty
Package: ifpdf 2016/05/14 v3.1 Provides the ifpdf switch
)
(/usr/share/texlive/texmf-dist/tex/generic/oberdiek/ifvtex.sty
Package: ifvtex 2016/05/16 v1.6 Detect VTeX and its facilities (HO)
Package ifvtex Info: VTeX not detected.
)
(/usr/share/texlive/texmf-dist/tex/generic/ifxetex/ifxetex.sty
Package: ifxetex 2010/09/12 v0.6 Provides ifxetex conditional
)
\Gm@cnth=\count88
\Gm@cntv=\count89
\c@Gm@tempcnt=\count90
\Gm@bindingoffset=\dimen103
\Gm@wd@mp=\dimen104
\Gm@odd@mp=\dimen105
\Gm@even@mp=\dimen106
\Gm@layoutwidth=\dimen107
\Gm@layoutheight=\dimen108
\Gm@layouthoffset=\dimen109
\Gm@layoutvoffset=\dimen110
\Gm@dimlist=\toks15
) (./5.aux)
\openout1 = `5.aux'.
LaTeX Font Info: Checking defaults for OML/cmm/m/it on input line 9.
LaTeX Font Info: ... okay on input line 9.
LaTeX Font Info: Checking defaults for T1/cmr/m/n on input line 9.
LaTeX Font Info: ... okay on input line 9.
LaTeX Font Info: Checking defaults for OT1/cmr/m/n on input line 9.
LaTeX Font Info: ... okay on input line 9.
LaTeX Font Info: Checking defaults for OMS/cmsy/m/n on input line 9.
LaTeX Font Info: ... okay on input line 9.
LaTeX Font Info: Checking defaults for OMX/cmex/m/n on input line 9.
LaTeX Font Info: ... okay on input line 9.
LaTeX Font Info: Checking defaults for U/cmr/m/n on input line 9.
LaTeX Font Info: ... okay on input line 9.
(/usr/share/texlive/texmf-dist/tex/context/base/mkii/supp-pdf.mkii
[Loading MPS to PDF converter (version 2006.09.02).]
\scratchcounter=\count91
\scratchdimen=\dimen111
\scratchbox=\box26
\nofMPsegments=\count92
\nofMParguments=\count93
\everyMPshowfont=\toks16
\MPscratchCnt=\count94
\MPscratchDim=\dimen112
\MPnumerator=\count95
\makeMPintoPDFobject=\count96
\everyMPtoPDFconversion=\toks17
)
*geometry* detected driver: dvips
*geometry* verbose mode - [ preamble ] result:
* driver: dvips
* paper: custom
* layout: <same size as paper>
* layoutoffset:(h,v)=(0.0pt,0.0pt)
* vratio: 1:1
* modes:
* h-part:(L,W,R)=(54.2025pt, 325.215pt, 54.2025pt)
* v-part:(T,H,B)=(79.49689pt, 491.43622pt, 79.49689pt)
* \paperwidth=433.62pt
* \paperheight=650.43pt
* \textwidth=325.215pt
* \textheight=491.43622pt
* \oddsidemargin=-18.06749pt
* \evensidemargin=-18.06749pt
* \topmargin=-29.7731pt
* \headheight=12.0pt
* \headsep=25.0pt
* \topskip=11.0pt
* \footskip=30.0pt
* \marginparwidth=59.0pt
* \marginparsep=10.0pt
* \columnsep=10.0pt
* \skip\footins=10.0pt plus 4.0pt minus 2.0pt
* \hoffset=0.0pt
* \voffset=0.0pt
* \mag=1000
* \@twocolumnfalse
* \@twosidefalse
* \@mparswitchfalse
* \@reversemarginfalse
* (1in=72.27pt=25.4mm, 1cm=28.453pt)
LaTeX Font Info: External font `cmex10' loaded for size
(Font) <12> on input line 11.
LaTeX Font Info: External font `cmex10' loaded for size
(Font) <8> on input line 11.
LaTeX Font Info: External font `cmex10' loaded for size
(Font) <6> on input line 11.
LaTeX Font Info: External font `cmex10' loaded for size
(Font) <10.95> on input line 16.
LaTeX Font Info: External font `cmex10' loaded for size
(Font) <9> on input line 16.
LaTeX Font Info: External font `cmex10' loaded for size
(Font) <5> on input line 16.
Underfull \hbox (badness 10000) in paragraph at lines 22--24
[]
Underfull \hbox (badness 10000) in paragraph at lines 25--27
[]
[1
Non-PDF special ignored!
{/var/lib/texmf/fonts/map/pdftex/updmap/pdftex.map}]
[2] [3] [4] (./5.aux) )
Here is how much of TeX's memory you used:
1942 strings out of 494945
25496 string characters out of 6181032
90870 words of memory out of 5000000
5266 multiletter control sequences out of 15000+600000
9723 words of font info for 34 fonts, out of 8000000 for 9000
14 hyphenation exceptions out of 8191
24i,8n,35p,923b,189s stack positions out of 5000i,500n,10000p,200000b,80000s
</usr/share/texlive/texmf-dist/fonts/type1/public/amsfon
ts/cm/cmbx10.pfb></usr/share/texlive/texmf-dist/fonts/type1/public/amsfonts/cm/
cmbx12.pfb></usr/share/texlive/texmf-dist/fonts/type1/public/amsfonts/cm/cmr10.
pfb></usr/share/texlive/texmf-dist/fonts/type1/public/amsfonts/cm/cmr12.pfb></u
sr/share/texlive/texmf-dist/fonts/type1/public/amsfonts/cm/cmr6.pfb></usr/share
/texlive/texmf-dist/fonts/type1/public/amsfonts/cm/cmr8.pfb></usr/share/texlive
/texmf-dist/fonts/type1/public/amsfonts/cm/cmr9.pfb>
Output written on 5.pdf (4 pages, 95810 bytes).
PDF statistics:
45 PDF objects out of 1000 (max. 8388607)
31 compressed objects within 1 object stream
0 named destinations out of 1000 (max. 500000)
1 words of extra memory for PDF output out of 10000 (max. 10000000)

BIN
2018/Running_Conduit/docs/5.pdf View File


+ 85
- 0
2018/Running_Conduit/docs/5.tex View File

@ -0,0 +1,85 @@
\documentclass[11pt]{article}
%Gummi|065|=)
\usepackage{xcolor}
\usepackage[vcentering,dvips]{geometry}
\geometry{papersize={6in,9in},total={4.5in,6.8in}}
\title{\textbf{Running Conduit - Tips}}
\author{Steak Electronics}
\date{}
\begin{document}
\maketitle
\textcolor{green!60!blue!70}{
\section{Overview}}
I recently took up running conduit for cable runs at the office. Here it's used for ethernet runs: CCTV, IoT, or general LANs. Here's what I learned early on.\footnote{Of course you can run mains through conduit, but I'll cover that later. Start with low voltage wiring.}
\textcolor{green!60!blue!70}{
\section{Conduit}}
Here are some general tips on Conduit:
\\
\textbf{Where conduit is hard:} Adding cabling to existing conduit, doing unusual bends, using thicker pipes (harder to bend)
\\
\textbf{Where conduit is easy:} The opposite: Cabling as you put up the conduit, doing only straight runs, 90 degree bends, and offset bends, and using 1/2" (smaller) conduit.
\vspace{0.2in}\textcolor{green!60!blue!70}{
\LARGE \textbf{Types of Pipe} \normalsize}
\vspace{0.2in}
There are different kinds of conduit, based on the size of the pipe. The price increases with size.
\vspace{0.2in}
1/2" pipe is good for one or two ethernet runs.
3/4" pipe is good for 3 ethernet cables.
1" pipe can run say, 6 ethernet cables.
\vspace{0.2in}
Now, you can get away with more, but it's best to underspec, so you have room in case of future expansion. However, it's recommended to not add additional cables to the conduit afterwards, and instead use ethernet switches.
\vspace{0.2in}\textcolor{green!60!blue!70}{
\LARGE \textbf{How to Fish Conduit} \normalsize}
\vspace{0.2in}
Ethernet cable should be led through conduit with steel fish tape. You can't use nylon string on existing conduit, unless you are going through small sections of straight conduit - fishing the string as you put up the conduit (new installs). For existing installs, or if you already put up some conduit and just need to get the wire through, use steel fish tape. The steel, allows you to pull AND push the ethernet cable, should it get stuck. However, let me say this: \textbf{fish the cable through each piece of conduit you put up as you go}. It's faster, and easier. This also means that future expansion is not nearly as practical.
\vspace{0.2in}\textcolor{green!60!blue!70}{
\LARGE \textbf{Couplers} \normalsize}
\vspace{0.2in}
The ideal coupler has the pipes inside sitting flush against each other, but some couplers have a notch in the middle between them. Those aren't as good, as the notch is a gap where ethernet cable will catch when pulling through. Not an issue if you cable as you go, but a problem for running cable through existing conduit.
\vspace{0.2in}\textcolor{green!60!blue!70}{
\LARGE \textbf{Boxes} \normalsize}
\vspace{0.2in}
Use the deeper, larger electrical boxes. They usually come in a few sizes. The additional space, makes everything easier. Use frequent boxes if you plan to expand more cables later, so you can access everything inside. Use boxes where you will have an ethernet switch or outlet, or need to branch out...
\vspace{0.2in}\textcolor{green!60!blue!70}{
\LARGE \textbf{Bendy Conduit} \normalsize}
\vspace{0.2in}
Bendable or Bendy conduit\footnote{There are a couple different kinds of this, and its something I'm still figuring out.} is sized one size bigger than it's listed. So if you buy 3/4" conduit, you get a 1" size bendable pipe, with 1/4" the bendy part. This means you must size boxes accordingly. Supposedly, you must buy the specific bendy conduit connectors, but you can fit a 3/4" bendy conduit, in a 1" hole in an electrical box in a pinch. You can also use a coupler (for standard pipe) sized one size bigger, in a pinch. Not as professional looking, but it works.\footnote{Low voltage only, of course. The correct (codewise) connectors for (mains-wire) flexible conduit are the ones that clamp down. You can adjust the screw as needed to adjust.}
\vspace{0.2in}\textcolor{green!60!blue!70}{
\LARGE \textbf{Grease} \normalsize}
\vspace{0.2in}
They sell grease, but its a mess, and I wouldn't use it. Not only will it get all inside the pipe, but all over your hands as you pull the wire through. You shouldn't run new wires through existing conduit. One of the problems is that you might wrap the ethernet cable in electrical tape, but tape is rubber, and sticks to the metal. What you want is some kind of slidy, metal surface that doesn't stick to metal on the front of the ethernet cable.
\vspace{0.2in}\textcolor{green!60!blue!70}{
\LARGE \textbf{Fish Tape and Plastic Ends} \normalsize}
\vspace{0.2in}
There is a little piece of plastic on my fish tape at the end. When running through existing small conduit, that plastic is a problem, as it hits wires, and couplers, catching. Solution: Remove the plastic piece. However, there are times when you want something plastic at the end of the metal fish tape. I.e. when you are running fish tape through the bendable conduit. In that case, put some electrical tape at the end of the conduit. This little trick can be the difference between barely fishing, and not getting through the pipe. The idea is, it's removable depending on your need. This is primarily for fishing through existing conduit. Again, you can't use nylon string to pull wire through conduit, you need metal fish tape. That is because metal fish tape can be pushed back and forth, but nylon string can only pull.
\textcolor{green!60!blue!70}{
\section{End of Year Review}}
Being a maintenance / IT / electronics engineer at my company, I get to wear a lot of hats, and conduit is one of them. I'm about to run some new conduit, and a few things make it easier, which I learned already. Use the smaller conduits. For awkward turns and bends use bendable conduit. Don't waste time trying complex bends on small runs. Light switches can always go before an outlet to control it on/off. This means you can have as many on/off switches you want. 120V Mains and conduit are easy if you are an EE, but I will cover this is a later document.
\end{document}

+ 85
- 0
2018/Running_Conduit/docs/5.tex~ View File

@ -0,0 +1,85 @@
\documentclass[11pt]{article}
%Gummi|065|=)
\usepackage{xcolor}
\usepackage[vcentering,dvips]{geometry}
\geometry{papersize={6in,9in},total={4.5in,6.8in}}
\title{\textbf{Running Conduit - Tips}}
\author{Steak Electronics}
\date{}
\begin{document}
\maketitle
\textcolor{green!60!blue!70}{
\section{Overview}}
I recently took up running conduit for cable runs at the office. Here it's used for ethernet runs: CCTV, IoT, or general LANs. Here's what I learned early on.\footnote{Of course you can run mains through conduit, but I'll cover that later. Start with low voltage wiring.}
\textcolor{green!60!blue!70}{
\section{Conduit}}
Here are some general tips on Conduit:
\\
\textbf{Where conduit is hard:} Adding cabling to existing conduit, doing unusual bends, using thicker pipes (harder to bend)
\\
\textbf{Where conduit is easy:} The opposite: Cabling as you put up the conduit, doing only straight runs, 90 degree bends, and offset bends, and using 1/2" (smaller) conduit.
\vspace{0.2in}\textcolor{green!60!blue!70}{
\LARGE \textbf{Types of Pipe} \normalsize}
\vspace{0.2in}
There are different kinds of conduit, based on the size of the pipe. The price increases with size.
\vspace{0.2in}
1/2" pipe is good for one or two ethernet runs.
3/4" pipe is good for 3 ethernet cables.
1" pipe can run say, 6 ethernet cables.
\vspace{0.2in}
Now, you can get away with more, but it's best to underspec, so you have room in case of future expansion. However, it's recommended to not add additional cables to the conduit afterwards, and instead use ethernet switches.
\vspace{0.2in}\textcolor{green!60!blue!70}{
\LARGE \textbf{How to Fish Conduit} \normalsize}
\vspace{0.2in}
Ethernet cable should be led through conduit with steel fish tape. You can't use nylon string on existing conduit, unless you are going through small sections of straight conduit - fishing the string as you put up the conduit (new installs). For existing installs, or if you already put up some conduit and just need to get the wire through, use steel fish tape. The steel, allows you to pull AND push the ethernet cable, should it get stuck. However, let me say this: \textbf{fish the cable through each piece of conduit you put up as you go}. It's faster, and easier. This also means that future expansion is not nearly as practical.
\vspace{0.2in}\textcolor{green!60!blue!70}{
\LARGE \textbf{Couplers} \normalsize}
\vspace{0.2in}
The ideal coupler has the pipes inside sitting flush against each other, but some couplers have a notch in the middle between them. Those aren't as good, as the notch is a gap where ethernet cable will catch when pulling through. Not an issue if you cable as you go, but a problem for running cable through existing conduit.
\vspace{0.2in}\textcolor{green!60!blue!70}{
\LARGE \textbf{Boxes} \normalsize}
\vspace{0.2in}
Use the deeper, larger electrical boxes. They usually come in a few sizes. The additional space, makes everything easier. Use frequent boxes if you plan to expand more cables later, so you can access everything inside. Use boxes where you will have an ethernet switch or outlet, or need to branch out...
\vspace{0.2in}\textcolor{green!60!blue!70}{
\LARGE \textbf{Bendy Conduit} \normalsize}
\vspace{0.2in}
Bendable or Bendy conduit\footnote{There are a couple different kinds of this, and its something I'm still figuring out.} is sized one size bigger than it's listed. So if you buy 3/4" conduit, you get a 1" size bendable pipe, with 1/4" the bendy part. This means you must size boxes accordingly. Supposedly, you must buy the specific bendy conduit connectors, but you can fit a 3/4" bendy conduit, in a 1" hole in an electrical box in a pinch. You can also use a coupler (for standard pipe) sized one size bigger, in a pinch. Not as professional looking, but it works.
\vspace{0.2in}\textcolor{green!60!blue!70}{
\LARGE \textbf{Grease} \normalsize}
\vspace{0.2in}
They sell grease, but its a mess, and I wouldn't use it. Not only will it get all inside the pipe, but all over your hands as you pull the wire through. You shouldn't run new wires through existing conduit. One of the problems is that you might wrap the ethernet cable in electrical tape, but tape is rubber, and sticks to the metal. What you want is some kind of slidy, metal surface that doesn't stick to metal on the front of the ethernet cable.
\vspace{0.2in}\textcolor{green!60!blue!70}{
\LARGE \textbf{Fish Tape and Plastic Ends} \normalsize}
\vspace{0.2in}
There is a little piece of plastic on my fish tape at the end. When running through existing small conduit, that plastic is a problem, as it hits wires, and couplers, catching. Solution: Remove the plastic piece. However, there are times when you want something plastic at the end of the metal fish tape. I.e. when you are running fish tape through the bendable conduit. In that case, put some electrical tape at the end of the conduit. This little trick can be the difference between barely fishing, and not getting through the pipe. The idea is, it's removable depending on your need. This is primarily for fishing through existing conduit. Again, you can't use nylon string to pull wire through conduit, you need metal fish tape. That is because metal fish tape can be pushed back and forth, but nylon string can only pull.
\textcolor{green!60!blue!70}{
\section{End of Year Review}}
Being a maintenance / IT / electronics engineer at my company, I get to wear a lot of hats, and conduit is one of them. I'm about to run some new conduit, and a few things make it easier, which I learned already. Use the smaller conduits. For awkward turns and bends use bendable conduit. Don't waste time trying complex bends on small runs. Light switches can always go before an outlet to control it on/off. This means you can have as many on/off switches you want. 120V Mains and conduit are easy if you are an EE, but I will cover this is a later document.
\end{document}

+ 4
- 0
2018/Running_Conduit/docs/6.aux View File

@ -0,0 +1,4 @@
\relax
\@writefile{toc}{\contentsline {section}{\numberline {1}Overview}{1}}
\@writefile{toc}{\contentsline {section}{\numberline {2}Conduit}{1}}
\@writefile{toc}{\contentsline {section}{\numberline {3}End of Year Review}{4}}

+ 199
- 0
2018/Running_Conduit/docs/6.log View File

@ -0,0 +1,199 @@
This is pdfTeX, Version 3.14159265-2.6-1.40.17 (TeX Live 2016/Debian) (preloaded format=pdflatex 2019.8.17) 17 JAN 2020 20:37
entering extended mode
restricted \write18 enabled.
%&-line parsing enabled.
**/home/layoutdev/Desktop/code/documentation_general/IT_Articles/2018/Running_C
onduit/docs/6.tex
(/home/layoutdev/Desktop/code/documentation_general/IT_Articles/2018/Running_Co
nduit/docs/6.tex
LaTeX2e <2017/01/01> patch level 3
Babel <3.9r> and hyphenation patterns for 3 language(s) loaded.
(/usr/share/texlive/texmf-dist/tex/latex/base/article.cls
Document Class: article 2014/09/29 v1.4h Standard LaTeX document class
(/usr/share/texlive/texmf-dist/tex/latex/base/size11.clo
File: size11.clo 2014/09/29 v1.4h Standard LaTeX file (size option)
)
\c@part=\count79
\c@section=\count80
\c@subsection=\count81
\c@subsubsection=\count82
\c@paragraph=\count83
\c@subparagraph=\count84
\c@figure=\count85
\c@table=\count86
\abovecaptionskip=\skip41
\belowcaptionskip=\skip42
\bibindent=\dimen102
)
(/usr/share/texlive/texmf-dist/tex/latex/xcolor/xcolor.sty
Package: xcolor 2016/05/11 v2.12 LaTeX color extensions (UK)
(/usr/share/texlive/texmf-dist/tex/latex/graphics-cfg/color.cfg
File: color.cfg 2016/01/02 v1.6 sample color configuration
)
Package xcolor Info: Driver file: pdftex.def on input line 225.
(/usr/share/texlive/texmf-dist/tex/latex/graphics-def/pdftex.def
File: pdftex.def 2017/01/12 v0.06k Graphics/color for pdfTeX
(/usr/share/texlive/texmf-dist/tex/generic/oberdiek/infwarerr.sty
Package: infwarerr 2016/05/16 v1.4 Providing info/warning/error messages (HO)
)
(/usr/share/texlive/texmf-dist/tex/generic/oberdiek/ltxcmds.sty
Package: ltxcmds 2016/05/16 v1.23 LaTeX kernel commands for general use (HO)
)
\Gread@gobject=\count87
)
Package xcolor Info: Model `cmy' substituted by `cmy0' on input line 1348.
Package xcolor Info: Model `hsb' substituted by `rgb' on input line 1352.
Package xcolor Info: Model `RGB' extended on input line 1364.
Package xcolor Info: Model `HTML' substituted by `rgb' on input line 1366.
Package xcolor Info: Model `Hsb' substituted by `hsb' on input line 1367.
Package xcolor Info: Model `tHsb' substituted by `hsb' on input line 1368.
Package xcolor Info: Model `HSB' substituted by `hsb' on input line 1369.
Package xcolor Info: Model `Gray' substituted by `gray' on input line 1370.
Package xcolor Info: Model `wave' substituted by `hsb' on input line 1371.
)
(/usr/share/texlive/texmf-dist/tex/latex/geometry/geometry.sty
Package: geometry 2010/09/12 v5.6 Page Geometry
(/usr/share/texlive/texmf-dist/tex/latex/graphics/keyval.sty
Package: keyval 2014/10/28 v1.15 key=value parser (DPC)
\KV@toks@=\toks14
)
(/usr/share/texlive/texmf-dist/tex/generic/oberdiek/ifpdf.sty
Package: ifpdf 2016/05/14 v3.1 Provides the ifpdf switch
)
(/usr/share/texlive/texmf-dist/tex/generic/oberdiek/ifvtex.sty
Package: ifvtex 2016/05/16 v1.6 Detect VTeX and its facilities (HO)
Package ifvtex Info: VTeX not detected.
)
(/usr/share/texlive/texmf-dist/tex/generic/ifxetex/ifxetex.sty
Package: ifxetex 2010/09/12 v0.6 Provides ifxetex conditional
)
\Gm@cnth=\count88
\Gm@cntv=\count89
\c@Gm@tempcnt=\count90
\Gm@bindingoffset=\dimen103
\Gm@wd@mp=\dimen104
\Gm@odd@mp=\dimen105
\Gm@even@mp=\dimen106
\Gm@layoutwidth=\dimen107
\Gm@layoutheight=\dimen108
\Gm@layouthoffset=\dimen109
\Gm@layoutvoffset=\dimen110
\Gm@dimlist=\toks15
) (./6.aux)
\openout1 = `6.aux'.
LaTeX Font Info: Checking defaults for OML/cmm/m/it on input line 9.
LaTeX Font Info: ... okay on input line 9.
LaTeX Font Info: Checking defaults for T1/cmr/m/n on input line 9.
LaTeX Font Info: ... okay on input line 9.
LaTeX Font Info: Checking defaults for OT1/cmr/m/n on input line 9.
LaTeX Font Info: ... okay on input line 9.
LaTeX Font Info: Checking defaults for OMS/cmsy/m/n on input line 9.
LaTeX Font Info: ... okay on input line 9.
LaTeX Font Info: Checking defaults for OMX/cmex/m/n on input line 9.
LaTeX Font Info: ... okay on input line 9.
LaTeX Font Info: Checking defaults for U/cmr/m/n on input line 9.
LaTeX Font Info: ... okay on input line 9.
(/usr/share/texlive/texmf-dist/tex/context/base/mkii/supp-pdf.mkii
[Loading MPS to PDF converter (version 2006.09.02).]
\scratchcounter=\count91
\scratchdimen=\dimen111
\scratchbox=\box26
\nofMPsegments=\count92
\nofMParguments=\count93
\everyMPshowfont=\toks16
\MPscratchCnt=\count94
\MPscratchDim=\dimen112
\MPnumerator=\count95
\makeMPintoPDFobject=\count96
\everyMPtoPDFconversion=\toks17
)
*geometry* detected driver: dvips
*geometry* verbose mode - [ preamble ] result:
* driver: dvips
* paper: custom
* layout: <same size as paper>
* layoutoffset:(h,v)=(0.0pt,0.0pt)
* vratio: 1:1
* modes:
* h-part:(L,W,R)=(54.2025pt, 325.215pt, 54.2025pt)
* v-part:(T,H,B)=(79.49689pt, 491.43622pt, 79.49689pt)
* \paperwidth=433.62pt
* \paperheight=650.43pt
* \textwidth=325.215pt
* \textheight=491.43622pt
* \oddsidemargin=-18.06749pt
* \evensidemargin=-18.06749pt
* \topmargin=-29.7731pt
* \headheight=12.0pt
* \headsep=25.0pt
* \topskip=11.0pt
* \footskip=30.0pt
* \marginparwidth=59.0pt
* \marginparsep=10.0pt
* \columnsep=10.0pt
* \skip\footins=10.0pt plus 4.0pt minus 2.0pt
* \hoffset=0.0pt
* \voffset=0.0pt
* \mag=1000
* \@twocolumnfalse
* \@twosidefalse
* \@mparswitchfalse
* \@reversemarginfalse
* (1in=72.27pt=25.4mm, 1cm=28.453pt)
LaTeX Font Info: External font `cmex10' loaded for size
(Font) <12> on input line 11.
LaTeX Font Info: External font `cmex10' loaded for size
(Font) <8> on input line 11.
LaTeX Font Info: External font `cmex10' loaded for size
(Font) <6> on input line 11.
LaTeX Font Info: External font `cmex10' loaded for size
(Font) <10.95> on input line 16.
LaTeX Font Info: External font `cmex10' loaded for size
(Font) <9> on input line 16.
LaTeX Font Info: External font `cmex10' loaded for size
(Font) <5> on input line 16.
Underfull \hbox (badness 10000) in paragraph at lines 22--24
[]
Underfull \hbox (badness 10000) in paragraph at lines 25--27
[]
[1
Non-PDF special ignored!
{/var/lib/texmf/fonts/map/pdftex/updmap/pdftex.map}]
[2] [3] [4] (./6.aux) )
Here is how much of TeX's memory you used:
1942 strings out of 494945
25496 string characters out of 6181032
90870 words of memory out of 5000000
5266 multiletter control sequences out of 15000+600000
9723 words of font info for 34 fonts, out of 8000000 for 9000
14 hyphenation exceptions out of 8191
24i,8n,35p,923b,189s stack positions out of 5000i,500n,10000p,200000b,80000s
</usr/share/texlive/texmf-dist/fonts/type1/public/amsfon
ts/cm/cmbx10.pfb></usr/share/texlive/texmf-dist/fonts/type1/public/amsfonts/cm/
cmbx12.pfb></usr/share/texlive/texmf-dist/fonts/type1/public/amsfonts/cm/cmr10.
pfb></usr/share/texlive/texmf-dist/fonts/type1/public/amsfonts/cm/cmr12.pfb></u
sr/share/texlive/texmf-dist/fonts/type1/public/amsfonts/cm/cmr6.pfb></usr/share
/texlive/texmf-dist/fonts/type1/public/amsfonts/cm/cmr8.pfb></usr/share/texlive
/texmf-dist/fonts/type1/public/amsfonts/cm/cmr9.pfb>
Output written on 6.pdf (4 pages, 95810 bytes).
PDF statistics:
45 PDF objects out of 1000 (max. 8388607)
31 compressed objects within 1 object stream
0 named destinations out of 1000 (max. 500000)
1 words of extra memory for PDF output out of 10000 (max. 10000000)

BIN
2018/Running_Conduit/docs/6.pdf View File


+ 85
- 0
2018/Running_Conduit/docs/6.tex View File

@ -0,0 +1,85 @@
\documentclass[11pt]{article}
%Gummi|065|=)
\usepackage{xcolor}
\usepackage[vcentering,dvips]{geometry}
\geometry{papersize={6in,9in},total={4.5in,6.8in}}
\title{\textbf{Running Conduit - Tips}}
\author{Steak Electronics}
\date{}
\begin{document}
\maketitle
\textcolor{green!60!blue!70}{
\section{Overview}}
I recently took up running conduit for cable runs at the office. Here it's used for ethernet runs: CCTV, IoT, or general LANs. Here's what I learned early on.\footnote{Of course you can run mains through conduit, but I'll cover that later. Start with low voltage wiring.}
\textcolor{green!60!blue!70}{
\section{Conduit}}
Here are some general tips on Conduit:
\\
\textbf{Where conduit is hard:} Adding cabling to existing conduit, doing unusual bends, using thicker pipes (harder to bend)
\\
\textbf{Where conduit is easy:} The opposite: Cabling as you put up the conduit, doing only straight runs, 90 degree bends, and offset bends, and using 1/2" (smaller) conduit.
\vspace{0.2in}\textcolor{green!60!blue!70}{
\LARGE \textbf{Types of Pipe} \normalsize}
\vspace{0.2in}
There are different kinds of conduit, based on the size of the pipe. The price increases with size.
\vspace{0.2in}
1/2" pipe is good for one or two ethernet runs.
3/4" pipe is good for 3 ethernet cables.
1" pipe can run say, 6 ethernet cables.
\vspace{0.2in}
Now, you can get away with more, but it's best to underspec, so you have room in case of future expansion. However, it's recommended to not add additional cables to the conduit afterwards, and instead use ethernet switches.
\vspace{0.2in}\textcolor{green!60!blue!70}{
\LARGE \textbf{How to Fish Conduit} \normalsize}
\vspace{0.2in}
Ethernet cable should be led through conduit with steel fish tape. You can't use nylon string on existing conduit, unless you are going through small sections of straight conduit - fishing the string as you put up the conduit (new installs). For existing installs, or if you already put up some conduit and just need to get the wire through, use steel fish tape. The steel, allows you to pull AND push the ethernet cable, should it get stuck. However, let me say this: \textbf{fish the cable through each piece of conduit you put up as you go}. It's faster, and easier. This also means that future expansion is not nearly as practical.
\vspace{0.2in}\textcolor{green!60!blue!70}{
\LARGE \textbf{Couplers} \normalsize}
\vspace{0.2in}
The ideal coupler has the pipes inside sitting flush against each other, but some couplers have a notch in the middle between them. Those aren't as good, as the notch is a gap where ethernet cable will catch when pulling through. Not an issue if you cable as you go, but a problem for running cable through existing conduit.
\vspace{0.2in}\textcolor{green!60!blue!70}{
\LARGE \textbf{Boxes} \normalsize}
\vspace{0.2in}
Use the deeper, larger electrical boxes. They usually come in a few sizes. The additional space, makes everything easier. Use frequent boxes if you plan to expand more cables later, so you can access everything inside. Use boxes where you will have an ethernet switch or outlet, or need to branch out...
\vspace{0.2in}\textcolor{green!60!blue!70}{
\LARGE \textbf{Bendy Conduit} \normalsize}
\vspace{0.2in}
Bendable or Bendy conduit\footnote{There are a couple different kinds of this, and its something I'm still figuring out.} is sized one size bigger than it's listed. So if you buy 3/4" conduit, you get a 1" size bendable pipe, with 1/4" the bendy part. This means you must size boxes accordingly. Supposedly, you must buy the specific bendy conduit connectors, but you can fit a 3/4" bendy conduit, in a 1" hole in an electrical box in a pinch. You can also use a coupler (for standard pipe) sized one size bigger, in a pinch. Not as professional looking, but it works.\footnote{Low voltage only, of course. The correct (codewise) connectors for (mains-wire) flexible conduit are the ones that clamp down. You can adjust the screw as needed to adjust.}
\vspace{0.2in}\textcolor{green!60!blue!70}{
\LARGE \textbf{Grease} \normalsize}
\vspace{0.2in}
They sell grease, but its a mess, and I wouldn't use it. Not only will it get all inside the pipe, but all over your hands as you pull the wire through. You shouldn't run new wires through existing conduit. One of the problems is that you might wrap the ethernet cable in electrical tape, but tape is rubber, and sticks to the metal. What you want is some kind of slidy, metal surface that doesn't stick to metal on the front of the ethernet cable.
\vspace{0.2in}\textcolor{green!60!blue!70}{
\LARGE \textbf{Fish Tape and Plastic Ends} \normalsize}
\vspace{0.2in}
There is a little piece of plastic on my fish tape at the end. When running through existing small conduit, that plastic is a problem, as it hits wires, and couplers, catching. Solution: Remove the plastic piece. However, there are times when you want something plastic at the end of the metal fish tape. I.e. when you are running fish tape through the bendable conduit. In that case, put some electrical tape at the end of the conduit. This little trick can be the difference between barely fishing, and not getting through the pipe. The idea is, it's removable depending on your need. This is primarily for fishing through existing conduit. Again, you can't use nylon string to pull wire through conduit, you need metal fish tape. That is because metal fish tape can be pushed back and forth, but nylon string can only pull.
\textcolor{green!60!blue!70}{
\section{End of Year Review}}
Being a maintenance / IT / electronics engineer at my company, I get to wear a lot of hats, and conduit is one of them. I'm about to run some new conduit, and a few things make it easier, which I learned already. Use the smaller conduits. For awkward turns and bends use bendable conduit. Don't waste time trying complex bends on small runs. Light switches can always go before an outlet to control it on/off. This means you can have as many on/off switches you want. 120V Mains and conduit are easy if you are an EE, but I will cover this is a later document.
\end{document}

+ 4
- 0
2018/Running_Conduit/docs/7.aux View File

@ -0,0 +1,4 @@
\relax
\@writefile{toc}{\contentsline {section}{\numberline {1}Overview}{1}}
\@writefile{toc}{\contentsline {section}{\numberline {2}Conduit}{1}}
\@writefile{toc}{\contentsline {section}{\numberline {3}End of Year Review}{4}}

+ 199
- 0
2018/Running_Conduit/docs/7.log View File

@ -0,0 +1,199 @@
This is pdfTeX, Version 3.14159265-2.6-1.40.17 (TeX Live 2016/Debian) (preloaded format=pdflatex 2019.8.17) 17 JAN 2020 20:38
entering extended mode
restricted \write18 enabled.
%&-line parsing enabled.
**/home/layoutdev/Desktop/code/documentation_general/IT_Articles/2018/Running_C
onduit/docs/7.tex
(/home/layoutdev/Desktop/code/documentation_general/IT_Articles/2018/Running_Co
nduit/docs/7.tex
LaTeX2e <2017/01/01> patch level 3
Babel <3.9r> and hyphenation patterns for 3 language(s) loaded.
(/usr/share/texlive/texmf-dist/tex/latex/base/article.cls
Document Class: article 2014/09/29 v1.4h Standard LaTeX document class
(/usr/share/texlive/texmf-dist/tex/latex/base/size11.clo
File: size11.clo 2014/09/29 v1.4h Standard LaTeX file (size option)
)
\c@part=\count79
\c@section=\count80
\c@subsection=\count81
\c@subsubsection=\count82
\c@paragraph=\count83
\c@subparagraph=\count84
\c@figure=\count85
\c@table=\count86
\abovecaptionskip=\skip41
\belowcaptionskip=\skip42
\bibindent=\dimen102
)
(/usr/share/texlive/texmf-dist/tex/latex/xcolor/xcolor.sty
Package: xcolor 2016/05/11 v2.12 LaTeX color extensions (UK)
(/usr/share/texlive/texmf-dist/tex/latex/graphics-cfg/color.cfg
File: color.cfg 2016/01/02 v1.6 sample color configuration
)
Package xcolor Info: Driver file: pdftex.def on input line 225.
(/usr/share/texlive/texmf-dist/tex/latex/graphics-def/pdftex.def
File: pdftex.def 2017/01/12 v0.06k Graphics/color for pdfTeX
(/usr/share/texlive/texmf-dist/tex/generic/oberdiek/infwarerr.sty
Package: infwarerr 2016/05/16 v1.4 Providing info/warning/error messages (HO)
)
(/usr/share/texlive/texmf-dist/tex/generic/oberdiek/ltxcmds.sty
Package: ltxcmds 2016/05/16 v1.23 LaTeX kernel commands for general use (HO)
)
\Gread@gobject=\count87
)
Package xcolor Info: Model `cmy' substituted by `cmy0' on input line 1348.
Package xcolor Info: Model `hsb' substituted by `rgb' on input line 1352.
Package xcolor Info: Model `RGB' extended on input line 1364.
Package xcolor Info: Model `HTML' substituted by `rgb' on input line 1366.
Package xcolor Info: Model `Hsb' substituted by `hsb' on input line 1367.
Package xcolor Info: Model `tHsb' substituted by `hsb' on input line 1368.
Package xcolor Info: Model `HSB' substituted by `hsb' on input line 1369.
Package xcolor Info: Model `Gray' substituted by `gray' on input line 1370.
Package xcolor Info: Model `wave' substituted by `hsb' on input line 1371.
)
(/usr/share/texlive/texmf-dist/tex/latex/geometry/geometry.sty
Package: geometry 2010/09/12 v5.6 Page Geometry
(/usr/share/texlive/texmf-dist/tex/latex/graphics/keyval.sty
Package: keyval 2014/10/28 v1.15 key=value parser (DPC)
\KV@toks@=\toks14
)
(/usr/share/texlive/texmf-dist/tex/generic/oberdiek/ifpdf.sty
Package: ifpdf 2016/05/14 v3.1 Provides the ifpdf switch
)
(/usr/share/texlive/texmf-dist/tex/generic/oberdiek/ifvtex.sty
Package: ifvtex 2016/05/16 v1.6 Detect VTeX and its facilities (HO)
Package ifvtex Info: VTeX not detected.
)
(/usr/share/texlive/texmf-dist/tex/generic/ifxetex/ifxetex.sty
Package: ifxetex 2010/09/12 v0.6 Provides ifxetex conditional
)
\Gm@cnth=\count88
\Gm@cntv=\count89
\c@Gm@tempcnt=\count90
\Gm@bindingoffset=\dimen103
\Gm@wd@mp=\dimen104
\Gm@odd@mp=\dimen105
\Gm@even@mp=\dimen106
\Gm@layoutwidth=\dimen107
\Gm@layoutheight=\dimen108
\Gm@layouthoffset=\dimen109
\Gm@layoutvoffset=\dimen110
\Gm@dimlist=\toks15
) (./7.aux)
\openout1 = `7.aux'.
LaTeX Font Info: Checking defaults for OML/cmm/m/it on input line 9.
LaTeX Font Info: ... okay on input line 9.
LaTeX Font Info: Checking defaults for T1/cmr/m/n on input line 9.
LaTeX Font Info: ... okay on input line 9.
LaTeX Font Info: Checking defaults for OT1/cmr/m/n on input line 9.
LaTeX Font Info: ... okay on input line 9.
LaTeX Font Info: Checking defaults for OMS/cmsy/m/n on input line 9.
LaTeX Font Info: ... okay on input line 9.
LaTeX Font Info: Checking defaults for OMX/cmex/m/n on input line 9.
LaTeX Font Info: ... okay on input line 9.
LaTeX Font Info: Checking defaults for U/cmr/m/n on input line 9.
LaTeX Font Info: ... okay on input line 9.
(/usr/share/texlive/texmf-dist/tex/context/base/mkii/supp-pdf.mkii
[Loading MPS to PDF converter (version 2006.09.02).]
\scratchcounter=\count91
\scratchdimen=\dimen111
\scratchbox=\box26
\nofMPsegments=\count92
\nofMParguments=\count93
\everyMPshowfont=\toks16
\MPscratchCnt=\count94
\MPscratchDim=\dimen112
\MPnumerator=\count95
\makeMPintoPDFobject=\count96
\everyMPtoPDFconversion=\toks17
)
*geometry* detected driver: dvips
*geometry* verbose mode - [ preamble ] result:
* driver: dvips
* paper: custom
* layout: <same size as paper>
* layoutoffset:(h,v)=(0.0pt,0.0pt)
* vratio: 1:1
* modes:
* h-part:(L,W,R)=(54.2025pt, 325.215pt, 54.2025pt)
* v-part:(T,H,B)=(79.49689pt, 491.43622pt, 79.49689pt)
* \paperwidth=433.62pt
* \paperheight=650.43pt
* \textwidth=325.215pt
* \textheight=491.43622pt
* \oddsidemargin=-18.06749pt
* \evensidemargin=-18.06749pt
* \topmargin=-29.7731pt
* \headheight=12.0pt
* \headsep=25.0pt
* \topskip=11.0pt
* \footskip=30.0pt
* \marginparwidth=59.0pt
* \marginparsep=10.0pt
* \columnsep=10.0pt
* \skip\footins=10.0pt plus 4.0pt minus 2.0pt
* \hoffset=0.0pt
* \voffset=0.0pt
* \mag=1000
* \@twocolumnfalse
* \@twosidefalse
* \@mparswitchfalse
* \@reversemarginfalse
* (1in=72.27pt=25.4mm, 1cm=28.453pt)
LaTeX Font Info: External font `cmex10' loaded for size
(Font) <12> on input line 11.
LaTeX Font Info: External font `cmex10' loaded for size
(Font) <8> on input line 11.
LaTeX Font Info: External font `cmex10' loaded for size
(Font) <6> on input line 11.
LaTeX Font Info: External font `cmex10' loaded for size
(Font) <10.95> on input line 16.
LaTeX Font Info: External font `cmex10' loaded for size
(Font) <9> on input line 16.
LaTeX Font Info: External font `cmex10' loaded for size
(Font) <5> on input line 16.
Underfull \hbox (badness 10000) in paragraph at lines 22--24
[]
Underfull \hbox (badness 10000) in paragraph at lines 25--27
[]
[1
Non-PDF special ignored!
{/var/lib/texmf/fonts/map/pdftex/updmap/pdftex.map}]
[2] [3] [4] (./7.aux) )
Here is how much of TeX's memory you used:
1942 strings out of 494945
25496 string characters out of 6181032
90870 words of memory out of 5000000
5266 multiletter control sequences out of 15000+600000
9723 words of font info for 34 fonts, out of 8000000 for 9000
14 hyphenation exceptions out of 8191
24i,8n,35p,923b,189s stack positions out of 5000i,500n,10000p,200000b,80000s
</usr/share/texlive/texmf-dist/fonts/type1/public/amsfon
ts/cm/cmbx10.pfb></usr/share/texlive/texmf-dist/fonts/type1/public/amsfonts/cm/
cmbx12.pfb></usr/share/texlive/texmf-dist/fonts/type1/public/amsfonts/cm/cmr10.
pfb></usr/share/texlive/texmf-dist/fonts/type1/public/amsfonts/cm/cmr12.pfb></u
sr/share/texlive/texmf-dist/fonts/type1/public/amsfonts/cm/cmr6.pfb></usr/share
/texlive/texmf-dist/fonts/type1/public/amsfonts/cm/cmr8.pfb></usr/share/texlive
/texmf-dist/fonts/type1/public/amsfonts/cm/cmr9.pfb>
Output written on 7.pdf (4 pages, 95873 bytes).
PDF statistics:
45 PDF objects out of 1000 (max. 8388607)
31 compressed objects within 1 object stream
0 named destinations out of 1000 (max. 500000)
1 words of extra memory for PDF output out of 10000 (max. 10000000)

BIN
2018/Running_Conduit/docs/7.pdf View File


+ 85
- 0
2018/Running_Conduit/docs/7.tex View File

@ -0,0 +1,85 @@
\documentclass[11pt]{article}
%Gummi|065|=)
\usepackage{xcolor}
\usepackage[vcentering,dvips]{geometry}
\geometry{papersize={6in,9in},total={4.5in,6.8in}}
\title{\textbf{Running Conduit - Tips}}
\author{Steak Electronics}
\date{}
\begin{document}
\maketitle
\textcolor{green!60!blue!70}{
\section{Overview}}
I recently took up running conduit for cable runs at the office. Here it's used for ethernet runs: CCTV, IoT, or general LANs. Here's what I learned early on.\footnote{Of course you can run mains through conduit, but I'll cover that later. Start with low voltage wiring.}
\textcolor{green!60!blue!70}{
\section{Conduit}}
Here are some general tips on Conduit:
\\
\textbf{Where conduit is hard:} Adding cabling to existing conduit, doing unusual bends, using thicker pipes (harder to bend)
\\
\textbf{Where conduit is easy:} The opposite: Cabling as you put up the conduit, doing only straight runs, 90 degree bends, and offset bends, and using 1/2" (smaller) conduit.
\vspace{0.2in}\textcolor{green!60!blue!70}{
\LARGE \textbf{Types of Pipe} \normalsize}
\vspace{0.2in}
There are different kinds of conduit, based on the size of the pipe. The price increases with size.
\vspace{0.2in}
1/2" pipe is good for one or two ethernet runs.
3/4" pipe is good for 3 ethernet cables.
1" pipe can run say, 6 ethernet cables.
\vspace{0.2in}
Now, you can get away with more, but it's best to underspec, so you have room in case of future expansion. However, it's recommended to not add additional cables to the conduit afterwards, and instead use ethernet switches.
\vspace{0.2in}\textcolor{green!60!blue!70}{
\LARGE \textbf{How to Fish Conduit} \normalsize}
\vspace{0.2in}
Ethernet cable should be led through conduit with steel fish tape. You can't use nylon string on existing conduit, unless you are going through small sections of straight conduit - fishing the string as you put up the conduit (new installs). For existing installs, or if you already put up some conduit and just need to get the wire through, use steel fish tape. The steel, allows you to pull AND push the ethernet cable, should it get stuck. However, let me say this: \textbf{fish the cable through each piece of conduit you put up as you go}. It's faster, and easier. This also means that future expansion is not nearly as practical.
\vspace{0.2in}\textcolor{green!60!blue!70}{
\LARGE \textbf{Couplers} \normalsize}
\vspace{0.2in}
The ideal coupler has the pipes inside sitting flush against each other, but some couplers have a notch in the middle between them. Those aren't as good, as the notch is a gap where ethernet cable will catch when pulling through. Not an issue if you cable as you go, but a problem for running cable through existing conduit.
\vspace{0.2in}\textcolor{green!60!blue!70}{
\LARGE \textbf{Boxes} \normalsize}
\vspace{0.2in}
Use the deeper, larger electrical boxes. They usually come in a few sizes. The additional space, makes everything easier. Use frequent boxes if you plan to expand more cables later, so you can access everything inside. Use boxes where you will have an ethernet switch or outlet, or need to branch out...
\vspace{0.2in}\textcolor{green!60!blue!70}{
\LARGE \textbf{Bendy Conduit} \normalsize}
\vspace{0.2in}
Bendable or Bendy conduit\footnote{There are a couple different kinds of this, and its something I'm still figuring out.} is sized one size bigger than it's listed. So if you buy 3/4" conduit, you get a 1" size bendable pipe, with 1/4" the bendy part. This means you must size boxes accordingly. Supposedly, you must buy the specific bendy conduit connectors, but you can fit a 3/4" bendy conduit, in a 1" hole in an electrical box in a pinch. You can also use a coupler (for standard pipe) sized one size bigger, in a pinch. Not as professional looking, but it works.\footnote{Low voltage only, of course. The correct (codewise) connectors for (mains-wire) flexible conduit are the ones that clamp down. You can adjust the screw as needed to adjust.}
\vspace{0.2in}\textcolor{green!60!blue!70}{
\LARGE \textbf{Grease} \normalsize}
\vspace{0.2in}
They sell grease, but its a mess, and I wouldn't use it. Not only will it get all inside the pipe, but all over your hands as you pull the wire through. You shouldn't run new wires through existing conduit. One of the problems is that you might wrap the ethernet cable in electrical tape, but tape is rubber, and sticks to the metal. What you want is some kind of slidy, metal surface that doesn't stick to metal on the front of the ethernet cable.
\vspace{0.2in}\textcolor{green!60!blue!70}{
\LARGE \textbf{Fish Tape and Plastic Ends} \normalsize}
\vspace{0.2in}
There is a little piece of plastic on my fish tape at the end. When running through existing small conduit, that plastic is a problem, as it hits wires, and couplers, catching. Solution: Remove the plastic piece. However, there are times when you want something plastic at the end of the metal fish tape. I.e. when you are running fish tape through the bendable conduit. In that case, put some electrical tape at the end of the conduit. This little trick can be the difference between barely fishing, and not getting through the pipe. The idea is, it's removable depending on your need. This is primarily for fishing through existing conduit. Again, you can't use nylon string to pull wire through conduit, you need metal fish tape. That is because metal fish tape can be pushed back and forth, but nylon string can only pull.
\textcolor{green!60!blue!70}{
\section{End of Year Review}}
Being a maintenance / IT / electronics engineer at my company, I get to wear a lot of hats, and conduit is one of them. I'm about to run some new conduit, and a few things make it easier, which I learned already. Use the smaller conduits. For awkward turns and bends use bendable conduit. Don't waste time trying complex bends on small runs. Light switches can always go before an outlet to control it on/off. This means you can have as many on/off switches you want. 120V Mains and conduit are easy if you are an EE, but I will cover this is a later document. It's a good idea to pick up a copy of the NEC or related reading material.
\end{document}

+ 85
- 0
2018/Running_Conduit/docs/7.tex~ View File

@ -0,0 +1,85 @@
\documentclass[11pt]{article}
%Gummi|065|=)
\usepackage{xcolor}
\usepackage[vcentering,dvips]{geometry}
\geometry{papersize={6in,9in},total={4.5in,6.8in}}
\title{\textbf{Running Conduit - Tips}}
\author{Steak Electronics}
\date{}
\begin{document}
\maketitle
\textcolor{green!60!blue!70}{
\section{Overview}}
I recently took up running conduit for cable runs at the office. Here it's used for ethernet runs: CCTV, IoT, or general LANs. Here's what I learned early on.\footnote{Of course you can run mains through conduit, but I'll cover that later. Start with low voltage wiring.}
\textcolor{green!60!blue!70}{
\section{Conduit}}
Here are some general tips on Conduit:
\\
\textbf{Where conduit is hard:} Adding cabling to existing conduit, doing unusual bends, using thicker pipes (harder to bend)
\\
\textbf{Where conduit is easy:} The opposite: Cabling as you put up the conduit, doing only straight runs, 90 degree bends, and offset bends, and using 1/2" (smaller) conduit.
\vspace{0.2in}\textcolor{green!60!blue!70}{
\LARGE \textbf{Types of Pipe} \normalsize}
\vspace{0.2in}
There are different kinds of conduit, based on the size of the pipe. The price increases with size.
\vspace{0.2in}
1/2" pipe is good for one or two ethernet runs.
3/4" pipe is good for 3 ethernet cables.
1" pipe can run say, 6 ethernet cables.
\vspace{0.2in}
Now, you can get away with more, but it's best to underspec, so you have room in case of future expansion. However, it's recommended to not add additional cables to the conduit afterwards, and instead use ethernet switches.
\vspace{0.2in}\textcolor{green!60!blue!70}{
\LARGE \textbf{How to Fish Conduit} \normalsize}
\vspace{0.2in}
Ethernet cable should be led through conduit with steel fish tape. You can't use nylon string on existing conduit, unless you are going through small sections of straight conduit - fishing the string as you put up the conduit (new installs). For existing installs, or if you already put up some conduit and just need to get the wire through, use steel fish tape. The steel, allows you to pull AND push the ethernet cable, should it get stuck. However, let me say this: \textbf{fish the cable through each piece of conduit you put up as you go}. It's faster, and easier. This also means that future expansion is not nearly as practical.
\vspace{0.2in}\textcolor{green!60!blue!70}{
\LARGE \textbf{Couplers} \normalsize}
\vspace{0.2in}
The ideal coupler has the pipes inside sitting flush against each other, but some couplers have a notch in the middle between them. Those aren't as good, as the notch is a gap where ethernet cable will catch when pulling through. Not an issue if you cable as you go, but a problem for running cable through existing conduit.
\vspace{0.2in}\textcolor{green!60!blue!70}{
\LARGE \textbf{Boxes} \normalsize}
\vspace{0.2in}
Use the deeper, larger electrical boxes. They usually come in a few sizes. The additional space, makes everything easier. Use frequent boxes if you plan to expand more cables later, so you can access everything inside. Use boxes where you will have an ethernet switch or outlet, or need to branch out...
\vspace{0.2in}\textcolor{green!60!blue!70}{
\LARGE \textbf{Bendy Conduit} \normalsize}
\vspace{0.2in}
Bendable or Bendy conduit\footnote{There are a couple different kinds of this, and its something I'm still figuring out.} is sized one size bigger than it's listed. So if you buy 3/4" conduit, you get a 1" size bendable pipe, with 1/4" the bendy part. This means you must size boxes accordingly. Supposedly, you must buy the specific bendy conduit connectors, but you can fit a 3/4" bendy conduit, in a 1" hole in an electrical box in a pinch. You can also use a coupler (for standard pipe) sized one size bigger, in a pinch. Not as professional looking, but it works.\footnote{Low voltage only, of course. The correct (codewise) connectors for (mains-wire) flexible conduit are the ones that clamp down. You can adjust the screw as needed to adjust.}
\vspace{0.2in}\textcolor{green!60!blue!70}{
\LARGE \textbf{Grease} \normalsize}
\vspace{0.2in}
They sell grease, but its a mess, and I wouldn't use it. Not only will it get all inside the pipe, but all over your hands as you pull the wire through. You shouldn't run new wires through existing conduit. One of the problems is that you might wrap the ethernet cable in electrical tape, but tape is rubber, and sticks to the metal. What you want is some kind of slidy, metal surface that doesn't stick to metal on the front of the ethernet cable.
\vspace{0.2in}\textcolor{green!60!blue!70}{
\LARGE \textbf{Fish Tape and Plastic Ends} \normalsize}
\vspace{0.2in}
There is a little piece of plastic on my fish tape at the end. When running through existing small conduit, that plastic is a problem, as it hits wires, and couplers, catching. Solution: Remove the plastic piece. However, there are times when you want something plastic at the end of the metal fish tape. I.e. when you are running fish tape through the bendable conduit. In that case, put some electrical tape at the end of the conduit. This little trick can be the difference between barely fishing, and not getting through the pipe. The idea is, it's removable depending on your need. This is primarily for fishing through existing conduit. Again, you can't use nylon string to pull wire through conduit, you need metal fish tape. That is because metal fish tape can be pushed back and forth, but nylon string can only pull.
\textcolor{green!60!blue!70}{
\section{End of Year Review}}
Being a maintenance / IT / electronics engineer at my company, I get to wear a lot of hats, and conduit is one of them. I'm about to run some new conduit, and a few things make it easier, which I learned already. Use the smaller conduits. For awkward turns and bends use bendable conduit. Don't waste time trying complex bends on small runs. Light switches can always go before an outlet to control it on/off. This means you can have as many on/off switches you want. 120V Mains and conduit are easy if you are an EE, but I will cover this is a later document. It's a good idea to pick up a copy of the NEC or related reading material.
\end{document}

BIN
2018/Running_Conduit/docs/fin.pdf View File


+ 38
- 37
2019/AutoSSH_and_Reverse_Proxy_Alternative/docs/2.log View File

@ -1,4 +1,4 @@
This is pdfTeX, Version 3.14159265-2.6-1.40.15 (TeX Live 2015/dev/Debian) (preloaded format=pdflatex 2018.11.28) 5 JUN 2019 00:28
This is pdfTeX, Version 3.14159265-2.6-1.40.17 (TeX Live 2016/Debian) (preloaded format=pdflatex 2019.8.17) 20 DEC 2019 17:15
entering extended mode
restricted \write18 enabled.
%&-line parsing enabled.
@ -7,8 +7,8 @@ nd_Reverse_Proxy_Alternative/docs/2.tex
(/home/layoutdev/Desktop/code/documentation_general/IT_Articles/2019/AutoSSH_an
d_Reverse_Proxy_Alternative/docs/2.tex
LaTeX2e <2014/05/01>
Babel <3.9l> and hyphenation patterns for 2 languages loaded.
LaTeX2e <2017/01/01> patch level 3
Babel <3.9r> and hyphenation patterns for 3 language(s) loaded.
(/usr/share/texlive/texmf-dist/tex/latex/base/article.cls
Document Class: article 2014/09/29 v1.4h Standard LaTeX document class
(/usr/share/texlive/texmf-dist/tex/latex/base/size11.clo
@ -27,31 +27,31 @@ File: size11.clo 2014/09/29 v1.4h Standard LaTeX file (size option)
\bibindent=\dimen102
)
(/usr/share/texlive/texmf-dist/tex/latex/graphics/graphicx.sty
Package: graphicx 2014/04/25 v1.0g Enhanced LaTeX Graphics (DPC,SPQR)
Package: graphicx 2014/10/28 v1.0g Enhanced LaTeX Graphics (DPC,SPQR)
(/usr/share/texlive/texmf-dist/tex/latex/graphics/keyval.sty
Package: keyval 2014/05/08 v1.15 key=value parser (DPC)
Package: keyval 2014/10/28 v1.15 key=value parser (DPC)
\KV@toks@=\toks14
)
(/usr/share/texlive/texmf-dist/tex/latex/graphics/graphics.sty
Package: graphics 2009/02/05 v1.0o Standard LaTeX Graphics (DPC,SPQR)
Package: graphics 2016/10/09 v1.0u Standard LaTeX Graphics (DPC,SPQR)
(/usr/share/texlive/texmf-dist/tex/latex/graphics/trig.sty
Package: trig 1999/03/16 v1.09 sin cos tan (DPC)
Package: trig 2016/01/03 v1.10 sin cos tan (DPC)
)
(/usr/share/texlive/texmf-dist/tex/latex/latexconfig/graphics.cfg
File: graphics.cfg 2010/04/23 v1.9 graphics configuration of TeX Live
(/usr/share/texlive/texmf-dist/tex/latex/graphics-cfg/graphics.cfg
File: graphics.cfg 2016/06/04 v1.11 sample graphics configuration
)
Package graphics Info: Driver file: pdftex.def on input line 91.
Package graphics Info: Driver file: pdftex.def on input line 99.
(/usr/share/texlive/texmf-dist/tex/latex/pdftex-def/pdftex.def
File: pdftex.def 2011/05/27 v0.06d Graphics/color for pdfTeX
(/usr/share/texlive/texmf-dist/tex/latex/graphics-def/pdftex.def
File: pdftex.def 2017/01/12 v0.06k Graphics/color for pdfTeX
(/usr/share/texlive/texmf-dist/tex/generic/oberdiek/infwarerr.sty
Package: infwarerr 2010/04/08 v1.3 Providing info/warning/error messages (HO)
Package: infwarerr 2016/05/16 v1.4 Providing info/warning/error messages (HO)
)
(/usr/share/texlive/texmf-dist/tex/generic/oberdiek/ltxcmds.sty
Package: ltxcmds 2011/11/09 v1.22 LaTeX kernel commands for general use (HO)
Package: ltxcmds 2016/05/16 v1.23 LaTeX kernel commands for general use (HO)
)
\Gread@gobject=\count87
))
@ -59,11 +59,11 @@ Package: ltxcmds 2011/11/09 v1.22 LaTeX kernel commands for general use (HO)
\Gin@req@width=\dimen104
)
(/usr/share/texlive/texmf-dist/tex/latex/caption/caption.sty
Package: caption 2013/05/02 v3.3-89 Customizing captions (AR)
Package: caption 2016/02/21 v3.3-144 Customizing captions (AR)
(/usr/share/texlive/texmf-dist/tex/latex/caption/caption3.sty
Package: caption3 2013/05/02 v1.6-88 caption3 kernel (AR)
Package caption3 Info: TeX engine: e-TeX on input line 57.
Package: caption3 2016/05/22 v1.7-166 caption3 kernel (AR)
Package caption3 Info: TeX engine: e-TeX on input line 67.
\captionmargin=\dimen105
\captionmargin@=\dimen106
\captionwidth=\dimen107
@ -73,8 +73,7 @@ Package caption3 Info: TeX engine: e-TeX on input line 57.
\caption@hangindent=\dimen111
)
\c@ContinuedFloat=\count88
)
No file 2.aux.
) (./2.aux)
\openout1 = `2.aux'.
LaTeX Font Info: Checking defaults for OML/cmm/m/it on input line 8.
@ -89,7 +88,8 @@ LaTeX Font Info: Checking defaults for OMX/cmex/m/n on input line 8.
LaTeX Font Info: ... okay on input line 8.
LaTeX Font Info: Checking defaults for U/cmr/m/n on input line 8.
LaTeX Font Info: ... okay on input line 8.
(/usr/share/texlive/texmf-dist/tex/context/base/supp-pdf.mkii
(/usr/share/texlive/texmf-dist/tex/context/base/mkii/supp-pdf.mkii
[Loading MPS to PDF converter (version 2006.09.02).]
\scratchcounter=\count89
\scratchdimen=\dimen112
@ -103,16 +103,15 @@ LaTeX Font Info: ... okay on input line 8.
\makeMPintoPDFobject=\count94
\everyMPtoPDFconversion=\toks16
) (/usr/share/texlive/texmf-dist/tex/generic/oberdiek/pdftexcmds.sty
Package: pdftexcmds 2011/11/29 v0.20 Utility functions of pdfTeX for LuaTeX (HO
Package: pdftexcmds 2016/05/21 v0.22 Utility functions of pdfTeX for LuaTeX (HO
)
(/usr/share/texlive/texmf-dist/tex/generic/oberdiek/ifluatex.sty
Package: ifluatex 2010/03/01 v1.3 Provides the ifluatex switch (HO)
Package: ifluatex 2016/05/16 v1.4 Provides the ifluatex switch (HO)
Package ifluatex Info: LuaTeX not detected.
)
(/usr/share/texlive/texmf-dist/tex/generic/oberdiek/ifpdf.sty
Package: ifpdf 2011/01/30 v2.3 Provides the ifpdf switch (HO)
Package ifpdf Info: pdfTeX in PDF mode is detected.
Package: ifpdf 2016/05/14 v3.1 Provides the ifpdf switch
)
Package pdftexcmds Info: LuaTeX not detected.
Package pdftexcmds Info: \pdf@primitive is available.
@ -120,31 +119,33 @@ Package pdftexcmds Info: \pdf@ifprimitive is available.
Package pdftexcmds Info: \pdfdraftmode found.
)
(/usr/share/texlive/texmf-dist/tex/latex/oberdiek/epstopdf-base.sty
Package: epstopdf-base 2010/02/09 v2.5 Base part for package epstopdf
Package: epstopdf-base 2016/05/15 v2.6 Base part for package epstopdf
(/usr/share/texlive/texmf-dist/tex/latex/oberdiek/grfext.sty
Package: grfext 2010/08/19 v1.1 Manage graphics extensions (HO)
Package: grfext 2016/05/16 v1.2 Manage graphics extensions (HO)
(/usr/share/texlive/texmf-dist/tex/generic/oberdiek/kvdefinekeys.sty
Package: kvdefinekeys 2011/04/07 v1.3 Define keys (HO)
Package: kvdefinekeys 2016/05/16 v1.4 Define keys (HO)
))
(/usr/share/texlive/texmf-dist/tex/latex/oberdiek/kvoptions.sty
Package: kvoptions 2011/06/30 v3.11 Key value format for package options (HO)
Package: kvoptions 2016/05/16 v3.12 Key value format for package options (HO)
(/usr/share/texlive/texmf-dist/tex/generic/oberdiek/kvsetkeys.sty
Package: kvsetkeys 2012/04/25 v1.16 Key value parser (HO)
Package: kvsetkeys 2016/05/16 v1.17 Key value parser (HO)
(/usr/share/texlive/texmf-dist/tex/generic/oberdiek/etexcmds.sty
Package: etexcmds 2011/02/16 v1.5 Avoid name clashes with e-TeX commands (HO)
Package: etexcmds 2016/05/16 v1.6 Avoid name clashes with e-TeX commands (HO)
Package etexcmds Info: Could not find \expanded.
(etexcmds) That can mean that you are not using pdfTeX 1.50 or
(etexcmds) that some package has redefined \expanded.
(etexcmds) In the latter case, load this package earlier.
)))
Package epstopdf-base Info: Redefining graphics rule for `.eps' on input line 4
38.
Package grfext Info: Graphics extension search list:
(grfext) [.png,.pdf,.jpg,.mps,.jpeg,.jbig2,.jb2,.PNG,.PDF,.JPG,.JPE
G,.JBIG2,.JB2,.eps]
(grfext) \AppendGraphicsExtensions on input line 452.
(grfext) \AppendGraphicsExtensions on input line 456.
(/usr/share/texlive/texmf-dist/tex/latex/latexconfig/epstopdf-sys.cfg
File: epstopdf-sys.cfg 2010/07/13 v1.3 Configuration of (r)epstopdf for TeX Liv
@ -228,13 +229,13 @@ LaTeX Font Info: Font shape `OMS/cmr/m/n' in size <10.95> not available
(Font) Font shape `OMS/cmsy/m/n' tried instead on input line 103.
[3] (./2.aux) )
Here is how much of TeX's memory you used:
2554 strings out of 495020
40741 string characters out of 6181323
95820 words of memory out of 5000000
5770 multiletter control sequences out of 15000+600000
2584 strings out of 494945
41296 string characters out of 6181032
96848 words of memory out of 5000000
5877 multiletter control sequences out of 15000+600000
8977 words of font info for 32 fonts, out of 8000000 for 9000
14 hyphenation exceptions out of 8191
38i,8n,38p,438b,241s stack positions out of 5000i,500n,10000p,200000b,80000s
39i,8n,38p,438b,241s stack positions out of 5000i,500n,10000p,200000b,80000s
</usr/share/texlive/texmf-dist/fonts/type1/public/amsfonts/cm/c
mbx10.pfb></usr/share/texlive/texmf-dist/fonts/type1/public/amsfonts/cm/cmbx12.
pfb></usr/share/texlive/texmf-dist/fonts/type1/public/amsfonts/cm/cmr10.pfb></u
@ -243,7 +244,7 @@ sr/share/texlive/texmf-dist/fonts/type1/public/amsfonts/cm/cmr6.pfb>
/texmf-dist/fonts/type1/public/amsfonts/cm/cmr9.pfb></usr/share/texlive/texmf-d
ist/fonts/type1/public/amsfonts/cm/cmsy10.pfb></usr/share/texlive/texmf-dist/fo
nts/type1/public/amsfonts/cm/cmtt10.pfb>
Output written on 2.pdf (3 pages, 106593 bytes).
Output written on 2.pdf (3 pages, 106586 bytes).
PDF statistics:
46 PDF objects out of 1000 (max. 8388607)
32 compressed objects within 1 object stream

BIN
2019/AutoSSH_and_Reverse_Proxy_Alternative/docs/2.pdf View File


+ 6
- 0
2019/AutoSSH_and_Reverse_Proxy_Alternative/docs/3.aux View File

@ -0,0 +1,6 @@
\relax
\@writefile{toc}{\contentsline {section}{\numberline {1}Overview}{1}}
\@writefile{toc}{\contentsline {section}{\numberline {2}Work Log}{1}}
\@writefile{toc}{\contentsline {subsection}{\numberline {2.1}Crontab}{1}}
\@writefile{toc}{\contentsline {subsection}{\numberline {2.2}Bash Script}{1}}
\@writefile{toc}{\contentsline {section}{\numberline {3}What Did NOT Work}{3}}

+ 376
- 0
2019/AutoSSH_and_Reverse_Proxy_Alternative/docs/3.log View File

@ -0,0 +1,376 @@
This is pdfTeX, Version 3.14159265-2.6-1.40.17 (TeX Live 2016/Debian) (preloaded format=pdflatex 2019.8.17) 20 DEC 2019 17:16
entering extended mode
restricted \write18 enabled.
%&-line parsing enabled.
**/home/layoutdev/Desktop/code/documentation_general/IT_Articles/2019/AutoSSH_a
nd_Reverse_Proxy_Alternative/docs/3.tex
(/home/layoutdev/Desktop/code/documentation_general/IT_Articles/2019/AutoSSH_an
d_Reverse_Proxy_Alternative/docs/3.tex
LaTeX2e <2017/01/01> patch level 3
Babel <3.9r> and hyphenation patterns for 3 language(s) loaded.
(/usr/share/texlive/texmf-dist/tex/latex/base/article.cls
Document Class: article 2014/09/29 v1.4h Standard LaTeX document class
(/usr/share/texlive/texmf-dist/tex/latex/base/size11.clo
File: size11.clo 2014/09/29 v1.4h Standard LaTeX file (size option)
)
\c@part=\count79
\c@section=\count80
\c@subsection=\count81
\c@subsubsection=\count82
\c@paragraph=\count83
\c@subparagraph=\count84
\c@figure=\count85
\c@table=\count86
\abovecaptionskip=\skip41
\belowcaptionskip=\skip42
\bibindent=\dimen102
)
(/usr/share/texlive/texmf-dist/tex/latex/xcolor/xcolor.sty
Package: xcolor 2016/05/11 v2.12 LaTeX color extensions (UK)
(/usr/share/texlive/texmf-dist/tex/latex/graphics-cfg/color.cfg
File: color.cfg 2016/01/02 v1.6 sample color configuration
)
Package xcolor Info: Driver file: pdftex.def on input line 225.
(/usr/share/texlive/texmf-dist/tex/latex/graphics-def/pdftex.def
File: pdftex.def 2017/01/12 v0.06k Graphics/color for pdfTeX
(/usr/share/texlive/texmf-dist/tex/generic/oberdiek/infwarerr.sty
Package: infwarerr 2016/05/16 v1.4 Providing info/warning/error messages (HO)
)
(/usr/share/texlive/texmf-dist/tex/generic/oberdiek/ltxcmds.sty
Package: ltxcmds 2016/05/16 v1.23 LaTeX kernel commands for general use (HO)
)
\Gread@gobject=\count87
)
Package xcolor Info: Model `cmy' substituted by `cmy0' on input line 1348.
Package xcolor Info: Model `hsb' substituted by `rgb' on input line 1352.
Package xcolor Info: Model `RGB' extended on input line 1364.
Package xcolor Info: Model `HTML' substituted by `rgb' on input line 1366.
Package xcolor Info: Model `Hsb' substituted by `hsb' on input line 1367.
Package xcolor Info: Model `tHsb' substituted by `hsb' on input line 1368.
Package xcolor Info: Model `HSB' substituted by `hsb' on input line 1369.
Package xcolor Info: Model `Gray' substituted by `gray' on input line 1370.
Package xcolor Info: Model `wave' substituted by `hsb' on input line 1371.
)
(/usr/share/texlive/texmf-dist/tex/latex/geometry/geometry.sty
Package: geometry 2010/09/12 v5.6 Page Geometry
(/usr/share/texlive/texmf-dist/tex/latex/graphics/keyval.sty
Package: keyval 2014/10/28 v1.15 key=value parser (DPC)
\KV@toks@=\toks14
)
(/usr/share/texlive/texmf-dist/tex/generic/oberdiek/ifpdf.sty
Package: ifpdf 2016/05/14 v3.1 Provides the ifpdf switch
)
(/usr/share/texlive/texmf-dist/tex/generic/oberdiek/ifvtex.sty
Package: ifvtex 2016/05/16 v1.6 Detect VTeX and its facilities (HO)
Package ifvtex Info: VTeX not detected.
)
(/usr/share/texlive/texmf-dist/tex/generic/ifxetex/ifxetex.sty
Package: ifxetex 2010/09/12 v0.6 Provides ifxetex conditional
)
\Gm@cnth=\count88
\Gm@cntv=\count89
\c@Gm@tempcnt=\count90
\Gm@bindingoffset=\dimen103
\Gm@wd@mp=\dimen104
\Gm@odd@mp=\dimen105
\Gm@even@mp=\dimen106
\Gm@layoutwidth=\dimen107
\Gm@layoutheight=\dimen108
\Gm@layouthoffset=\dimen109
\Gm@layoutvoffset=\dimen110
\Gm@dimlist=\toks15
)
(/usr/share/texlive/texmf-dist/tex/latex/graphics/graphicx.sty
Package: graphicx 2014/10/28 v1.0g Enhanced LaTeX Graphics (DPC,SPQR)
(/usr/share/texlive/texmf-dist/tex/latex/graphics/graphics.sty
Package: graphics 2016/10/09 v1.0u Standard LaTeX Graphics (DPC,SPQR)
(/usr/share/texlive/texmf-dist/tex/latex/graphics/trig.sty
Package: trig 2016/01/03 v1.10 sin cos tan (DPC)
)
(/usr/share/texlive/texmf-dist/tex/latex/graphics-cfg/graphics.cfg
File: graphics.cfg 2016/06/04 v1.11 sample graphics configuration
)
Package graphics Info: Driver file: pdftex.def on input line 99.
)
\Gin@req@height=\dimen111
\Gin@req@width=\dimen112
)
(/usr/share/texlive/texmf-dist/tex/latex/caption/caption.sty
Package: caption 2016/02/21 v3.3-144 Customizing captions (AR)
(/usr/share/texlive/texmf-dist/tex/latex/caption/caption3.sty
Package: caption3 2016/05/22 v1.7-166 caption3 kernel (AR)
Package caption3 Info: TeX engine: e-TeX on input line 67.
\captionmargin=\dimen113
\captionmargin@=\dimen114
\captionwidth=\dimen115
\caption@tempdima=\dimen116
\caption@indent=\dimen117
\caption@parindent=\dimen118
\caption@hangindent=\dimen119
)
\c@ContinuedFloat=\count91
)
No file 3.aux.
\openout1 = `3.aux'.
LaTeX Font Info: Checking defaults for OML/cmm/m/it on input line 11.
LaTeX Font Info: ... okay on input line 11.
LaTeX Font Info: Checking defaults for T1/cmr/m/n on input line 11.
LaTeX Font Info: ... okay on input line 11.
LaTeX Font Info: Checking defaults for OT1/cmr/m/n on input line 11.
LaTeX Font Info: ... okay on input line 11.
LaTeX Font Info: Checking defaults for OMS/cmsy/m/n on input line 11.
LaTeX Font Info: ... okay on input line 11.
LaTeX Font Info: Checking defaults for OMX/cmex/m/n on input line 11.
LaTeX Font Info: ... okay on input line 11.
LaTeX Font Info: Checking defaults for U/cmr/m/n on input line 11.
LaTeX Font Info: ... okay on input line 11.
(/usr/share/texlive/texmf-dist/tex/context/base/mkii/supp-pdf.mkii
[Loading MPS to PDF converter (version 2006.09.02).]
\scratchcounter=\count92
\scratchdimen=\dimen120
\scratchbox=\box26
\nofMPsegments=\count93
\nofMParguments=\count94
\everyMPshowfont=\toks16
\MPscratchCnt=\count95
\MPscratchDim=\dimen121
\MPnumerator=\count96
\makeMPintoPDFobject=\count97
\everyMPtoPDFconversion=\toks17
) (/usr/share/texlive/texmf-dist/tex/generic/oberdiek/pdftexcmds.sty
Package: pdftexcmds 2016/05/21 v0.22 Utility functions of pdfTeX for LuaTeX (HO
)
(/usr/share/texlive/texmf-dist/tex/generic/oberdiek/ifluatex.sty
Package: ifluatex 2016/05/16 v1.4 Provides the ifluatex switch (HO)
Package ifluatex Info: LuaTeX not detected.
)
Package pdftexcmds Info: LuaTeX not detected.
Package pdftexcmds Info: \pdf@primitive is available.
Package pdftexcmds Info: \pdf@ifprimitive is available.
Package pdftexcmds Info: \pdfdraftmode found.
)
(/usr/share/texlive/texmf-dist/tex/latex/oberdiek/epstopdf-base.sty
Package: epstopdf-base 2016/05/15 v2.6 Base part for package epstopdf
(/usr/share/texlive/texmf-dist/tex/latex/oberdiek/grfext.sty
Package: grfext 2016/05/16 v1.2 Manage graphics extensions (HO)
(/usr/share/texlive/texmf-dist/tex/generic/oberdiek/kvdefinekeys.sty
Package: kvdefinekeys 2016/05/16 v1.4 Define keys (HO)
))
(/usr/share/texlive/texmf-dist/tex/latex/oberdiek/kvoptions.sty
Package: kvoptions 2016/05/16 v3.12 Key value format for package options (HO)
(/usr/share/texlive/texmf-dist/tex/generic/oberdiek/kvsetkeys.sty
Package: kvsetkeys 2016/05/16 v1.17 Key value parser (HO)
(/usr/share/texlive/texmf-dist/tex/generic/oberdiek/etexcmds.sty
Package: etexcmds 2016/05/16 v1.6 Avoid name clashes with e-TeX commands (HO)
Package etexcmds Info: Could not find \expanded.
(etexcmds) That can mean that you are not using pdfTeX 1.50 or
(etexcmds) that some package has redefined \expanded.
(etexcmds) In the latter case, load this package earlier.
)))
Package epstopdf-base Info: Redefining graphics rule for `.eps' on input line 4
38.
Package grfext Info: Graphics extension search list:
(grfext) [.png,.pdf,.jpg,.mps,.jpeg,.jbig2,.jb2,.PNG,.PDF,.JPG,.JPE
G,.JBIG2,.JB2,.eps]
(grfext) \AppendGraphicsExtensions on input line 456.
(/usr/share/texlive/texmf-dist/tex/latex/latexconfig/epstopdf-sys.cfg
File: epstopdf-sys.cfg 2010/07/13 v1.3 Configuration of (r)epstopdf for TeX Liv
e
))
*geometry* detected driver: dvips
*geometry* verbose mode - [ preamble ] result:
* driver: dvips
* paper: custom
* layout: <same size as paper>
* layoutoffset:(h,v)=(0.0pt,0.0pt)
* vratio: 1:1
* modes:
* h-part:(L,W,R)=(54.2025pt, 325.215pt, 54.2025pt)
* v-part:(T,H,B)=(79.49689pt, 491.43622pt, 79.49689pt)
* \paperwidth=433.62pt
* \paperheight=650.43pt
* \textwidth=325.215pt
* \textheight=491.43622pt
* \oddsidemargin=-18.06749pt
* \evensidemargin=-18.06749pt
* \topmargin=-29.7731pt
* \headheight=12.0pt
* \headsep=25.0pt
* \topskip=11.0pt
* \footskip=30.0pt
* \marginparwidth=59.0pt
* \marginparsep=10.0pt
* \columnsep=10.0pt
* \skip\footins=10.0pt plus 4.0pt minus 2.0pt
* \hoffset=0.0pt
* \voffset=0.0pt
* \mag=1000
* \@twocolumnfalse
* \@twosidefalse
* \@mparswitchfalse
* \@reversemarginfalse
* (1in=72.27pt=25.4mm, 1cm=28.453pt)
Package caption Info: Begin \AtBeginDocument code.
Package caption Info: End \AtBeginDocument code.
[1
Non-PDF special ignored!
{/var/lib/texmf/fonts/map/pdftex/updmap/pdftex.map}]
Overfull \hbox (65.69577pt too wide) in paragraph at lines 53--53
[]\OT1/cmtt/m/n/10.95 autossh -L 0.0.0.0:2:localhost:80 -f user@ipaddress sle
ep 31536000[]
[]
Overfull \hbox (71.44446pt too wide) in paragraph at lines 53--53
[]\OT1/cmtt/m/n/10.95 #autossh -M 0 -o "ServerAliveInterval 30" -o "ServerAliv
eCountMax 3"[]
[]
LaTeX Font Info: External font `cmex10' loaded for size
(Font) <10.95> on input line 54.
LaTeX Font Info: External font `cmex10' loaded for size
(Font) <8> on input line 54.
LaTeX Font Info: External font `cmex10' loaded for size
(Font) <6> on input line 54.
LaTeX Font Info: External font `cmex10' loaded for size
(Font) <9> on input line 54.
LaTeX Font Info: External font `cmex10' loaded for size
(Font) <5> on input line 54.
Overfull \hbox (59.94708pt too wide) in paragraph at lines 100--100
[]\OT1/cmtt/m/n/10.95 solves this in a painless way. It's in the repos for Debi
an/Ubuntu:[]
[]
Overfull \hbox (36.95233pt too wide) in paragraph at lines 100--100
[]\OT1/cmtt/m/n/10.95 and perhaps for many other distros (it looks like it orig
inated[]
[]
Overfull \hbox (19.70627pt too wide) in paragraph at lines 100--100
[]\OT1/cmtt/m/n/10.95 This program will start an ssh-agent if none is running,
and[]
[]
Overfull \hbox (54.1984pt too wide) in paragraph at lines 100--100
[] \OT1/cmtt/m/n/10.95 provide shell scripts that can be sourced and connect th
e current[]
[]
Overfull \hbox (36.95233pt too wide) in paragraph at lines 100--100
[]\OT1/cmtt/m/n/10.95 For bash, with a private key named id_rsa, add the follow
ing to[]
[]
Overfull \hbox (42.70102pt too wide) in paragraph at lines 100--100
[]\OT1/cmtt/m/n/10.95 This will start an ssh-agent and add the id_rsa key on th
e first[]
[]
Overfull \hbox (42.70102pt too wide) in paragraph at lines 100--100
[] \OT1/cmtt/m/n/10.95 login after reboot. If the key is passphrase-protected,
it will[]
[]
[2]
Overfull \hbox (25.45496pt too wide) in paragraph at lines 100--100
[] \OT1/cmtt/m/n/10.95 also ask for the passphrase. No need to use unprotected
keys[]
[]
Overfull \hbox (19.70627pt too wide) in paragraph at lines 100--100
[] \OT1/cmtt/m/n/10.95 anymore! For subsequent logins, it will recognize the ag
ent[]
[]
Overfull \hbox (48.4497pt too wide) in paragraph at lines 100--100
[]\OT1/cmtt/m/n/10.95 This will let the shell know where to reach the SSH agent
managed[]
[]
Overfull \hbox (31.20364pt too wide) in paragraph at lines 100--100
[] \OT1/cmtt/m/n/10.95 by keychain. Make sure that .bashrc is sourced from .pro
file.[]
[]
Overfull \hbox (13.95758pt too wide) in paragraph at lines 100--100
[]\OT1/cmtt/m/n/10.95 However, it seems that cron jobs still don't see this. As
a[]
[]
Overfull \hbox (13.95758pt too wide) in paragraph at lines 100--100
[] \OT1/cmtt/m/n/10.95 remedy, include the line above in the crontab, just befo
re[]
[]
Overfull \hbox (2.4602pt too wide) in paragraph at lines 100--100
[]\OT1/cmtt/m/n/10.95 * * * * * . ~/.keychain/$HOSTNAME-sh; your-actual-command
[]
[]
LaTeX Font Info: Try loading font information for OMS+cmr on input line 111.
(/usr/share/texlive/texmf-dist/tex/latex/base/omscmr.fd
File: omscmr.fd 2014/09/29 v2.5h Standard LaTeX font definitions
)
LaTeX Font Info: Font shape `OMS/cmr/m/n' in size <10.95> not available
(Font) Font shape `OMS/cmsy/m/n' tried instead on input line 111.
Overfull \hbox (4.53256pt too wide) in paragraph at lines 111--112
[]\OT1/cmr/m/n/10.95 https://github.com/obfusk/autossh-init - This init script,
didn't
[]
[3] [4] (./3.aux) )
Here is how much of TeX's memory you used:
3526 strings out of 494945
53591 string characters out of 6181032
123335 words of memory out of 5000000
6804 multiletter control sequences out of 15000+600000
8977 words of font info for 32 fonts, out of 8000000 for 9000
14 hyphenation exceptions out of 8191
39i,8n,38p,438b,251s stack positions out of 5000i,500n,10000p,200000b,80000s
</usr/share/texlive/texmf-dist/fonts/type1/public/amsfonts/c
m/cmbx10.pfb></usr/share/texlive/texmf-dist/fonts/type1/public/amsfonts/cm/cmbx
12.pfb></usr/share/texlive/texmf-dist/fonts/type1/public/amsfonts/cm/cmr10.pfb>
</usr/share/texlive/texmf-dist/fonts/type1/public/amsfonts/cm/cmr6.pfb></usr/sh
are/texlive/texmf-dist/fonts/type1/public/amsfonts/cm/cmr8.pfb></usr/share/texl
ive/texmf-dist/fonts/type1/public/amsfonts/cm/cmr9.pfb></usr/share/texlive/texm
f-dist/fonts/type1/public/amsfonts/cm/cmsy10.pfb></usr/share/texlive/texmf-dist
/fonts/type1/public/amsfonts/cm/cmtt10.pfb>
Output written on 3.pdf (4 pages, 107011 bytes).
PDF statistics:
49 PDF objects out of 1000 (max. 8388607)
34 compressed objects within 1 object stream
0 named destinations out of 1000 (max. 500000)
1 words of extra memory for PDF output out of 10000 (max. 10000000)

BIN
2019/AutoSSH_and_Reverse_Proxy_Alternative/docs/3.pdf View File


+ 118
- 0
2019/AutoSSH_and_Reverse_Proxy_Alternative/docs/3.tex View File

@ -0,0 +1,118 @@
\documentclass[11pt]{article}
%Gummi|065|=)
\title{\textbf{AutoSSH - a Reverse Proxy Alternative}}
\usepackage{xcolor}
\usepackage[vcentering,dvips]{geometry}
\geometry{papersize={6in,9in},total={4.5in,6.8in}}
\usepackage{graphicx}
\usepackage{caption }
\author{Steak Electronics}
\date{06/4/19}
\begin{document}
%\maketitle
\textbf{AutoSSH - a Reverse Proxy Alternative}
\vspace{0.2in}
This document is best read printed out on paper.
%\textbf{Todo}
\textcolor{green!60!blue!70}{
\section{Overview}}
I recently added another apache server to an existing infrastructure, and I wanted it to be accessible under a similar IP as another server. Due to the complexity of the website, it was not possible to simply do a reverse proxy without knowing the correct settings (e.g. X-Forwarded for). Instead, AutoSSH was used.
\textcolor{green!60!blue!70}{
\section{Work Log}}
Ok, I'm going to get right to the configs that I used. You want the tool, you don't need to know all the details.
\textcolor{green!60!blue!70}{
\subsection{Crontab}}
Here is the crontab script I used. I put this in /etc/crontab, so it has root after the times. I only use /etc/crontab, as it's easier to manage.
\begin{verbatim}
* * * * * root pgrep autossh > /dev/null || \
/usr/local/bin/autosshzm/autosshzm.sh
\end{verbatim}
A few notes about this. Pgrep will search for autossh. If it doesn't find it, then it will try the next command. (|| is an OR). Put the bash script wherever you want.
\textcolor{green!60!blue!70}{
\subsection{Bash Script}}
This script is obviously what the crontab calls.
\begin{verbatim}
#!/bin/bash
logger " /usr/local/bin/autosshzm script started."
#source $HOME/.bash_profile #not needed.
source $HOME/.keychain/$HOSTNAME-sh
logger " /usr/local/bin/autosshzm sourced."
autossh -L 0.0.0.0:2:localhost:80 -f user@ipaddress sleep 31536000
&> /var/log/autosshzm/autosshzm.log
#autossh -M 0 -o "ServerAliveInterval 30" -o "ServerAliveCountMax 3"
-L 0.0.0.0:2:localhost:80 user@ipaddress &>
/var/log/autosshzm/autosshzm.log
logger "auto ssh ran"
\end{verbatim}
Note that the second autossh does not work, as it's missing the sleep and the -f command. \footnote{Figuring this kind of stuff out can take about an hour.} In order for this to work, you'll also need the following commands:
\begin{verbatim}
apt-get install keychain autossh
\end{verbatim}
There were some more setup steps required for keychain...
From stackexchange:
\begin{verbatim}
25
keychain
solves this in a painless way. It's in the repos for Debian/Ubuntu:
sudo apt-get install keychain
and perhaps for many other distros (it looks like it originated
from Gentoo).
This program will start an ssh-agent if none is running, and
provide shell scripts that can be sourced and connect the current
shell to this particular ssh-agent.
For bash, with a private key named id_rsa, add the following to
your .profile:
keychain --nogui id_rsa
This will start an ssh-agent and add the id_rsa key on the first
login after reboot. If the key is passphrase-protected, it will
also ask for the passphrase. No need to use unprotected keys
anymore! For subsequent logins, it will recognize the agent
and not ask for a passphrase again.
Also, add the following as a last line of your .bashrc:
. ~/.keychain/$HOSTNAME-sh
This will let the shell know where to reach the SSH agent managed
by keychain. Make sure that .bashrc is sourced from .profile.
However, it seems that cron jobs still don't see this. As a
remedy, include the line above in the crontab, just before
your actual command:
* * * * * . ~/.keychain/$HOSTNAME-sh; your-actual-command
\end{verbatim}
The only thing that I needed to do here was
keychain --nogui id\_rsa
The rest of it (notes about crontab) was not required.
\textcolor{green!60!blue!70}{
\section{What Did NOT Work}}
Here's some things I tried that did not work.
\begin{itemize}
\item https://github.com/obfusk/autossh-init - This init script, didn't do much for me. Remember, I'm stuck with systemd in Ubuntu 19.04...\footnote{The scourge of deleting software history. Keep backwards compatibility at ALL COSTS, developers.}
\item Reverse proxy with Apache - As I said, my website \footnote{Some people might call it a web application. I will not.} was too complex, and I didn't want to go down that rabbit hole.
\item Starting AutoSSH in rc.local. Didn't work.
\end{itemize}
\end{document}

BIN
2019/AutoSSH_and_Reverse_Proxy_Alternative/docs/fin.pdf View File


+ 2
- 2
2019/Docker_Primer/docs/2.log View File

@ -1,4 +1,4 @@
This is pdfTeX, Version 3.14159265-2.6-1.40.17 (TeX Live 2016/Debian) (preloaded format=pdflatex 2019.8.17) 31 AUG 2019 00:34
This is pdfTeX, Version 3.14159265-2.6-1.40.17 (TeX Live 2016/Debian) (preloaded format=pdflatex 2019.8.17) 4 SEP 2019 00:08
entering extended mode
restricted \write18 enabled.
%&-line parsing enabled.
@ -121,7 +121,7 @@ r/share/texlive/texmf-dist/fonts/type1/public/amsfonts/cm/cmr12.pfb>
ist/fonts/type1/public/amsfonts/cm/cmr9.pfb></usr/share/texlive/texmf-dist/font
s/type1/public/amsfonts/cm/cmsy10.pfb></usr/share/texlive/texmf-dist/fonts/type
1/public/amsfonts/cm/cmtt10.pfb>
Output written on 2.pdf (5 pages, 123537 bytes).
Output written on 2.pdf (5 pages, 123530 bytes).
PDF statistics:
56 PDF objects out of 1000 (max. 8388607)
39 compressed objects within 1 object stream

BIN
2019/Docker_Primer/docs/2.pdf View File


+ 14
- 0
2019/Docker_Primer/docs/3.aux View File

@ -0,0 +1,14 @@
\relax
\@writefile{toc}{\contentsline {section}{\numberline {1}Overview}{1}}
\@writefile{toc}{\contentsline {section}{\numberline {2}General Notes}{2}}
\@writefile{toc}{\contentsline {subsection}{\numberline {2.1}Docker Commands Reference}{2}}
\@writefile{toc}{\contentsline {section}{\numberline {3}Specific Tips}{3}}
\@writefile{toc}{\contentsline {subsection}{\numberline {3.1}YAML is space sensitive}{3}}
\@writefile{toc}{\contentsline {subsection}{\numberline {3.2}If you restart a containers namesake process, it will probably restart / reset the container}{3}}
\@writefile{toc}{\contentsline {subsection}{\numberline {3.3}Use a single reverse proxy, to handle multiple websites}{4}}
\@writefile{toc}{\contentsline {subsection}{\numberline {3.4}If you use a single reverse proxy, Lets Encrypt can be done easy}{4}}
\@writefile{toc}{\contentsline {subsection}{\numberline {3.5}Give every Container a Containername}{5}}
\@writefile{toc}{\contentsline {subsection}{\numberline {3.6}Beware of Interrupting Initting Containers}{5}}
\@writefile{toc}{\contentsline {subsection}{\numberline {3.7}Put Apache or Program logs from the Container in a volume that is locally accessible}{5}}
\@writefile{toc}{\contentsline {subsection}{\numberline {3.8}Only Restart Containers you need to Restart}{5}}
\@writefile{toc}{\contentsline {subsection}{\numberline {3.9}Volumes Mounting Over Existing Directories}{5}}

+ 136
- 0
2019/Docker_Primer/docs/3.log View File

@ -0,0 +1,136 @@
This is pdfTeX, Version 3.14159265-2.6-1.40.17 (TeX Live 2016/Debian) (preloaded format=pdflatex 2019.8.17) 4 SEP 2019 00:15
entering extended mode
restricted \write18 enabled.
%&-line parsing enabled.
**/home/layoutdev/Desktop/code/documentation_general/IT_Articles/2019/Docker_Pr
imer/docs/3.tex
(/home/layoutdev/Desktop/code/documentation_general/IT_Articles/2019/Docker_Pri
mer/docs/3.tex
LaTeX2e <2017/01/01> patch level 3
Babel <3.9r> and hyphenation patterns for 3 language(s) loaded.
(/usr/share/texlive/texmf-dist/tex/latex/base/article.cls
Document Class: article 2014/09/29 v1.4h Standard LaTeX document class
(/usr/share/texlive/texmf-dist/tex/latex/base/size11.clo
File: size11.clo 2014/09/29 v1.4h Standard LaTeX file (size option)
)
\c@part=\count79
\c@section=\count80
\c@subsection=\count81
\c@subsubsection=\count82
\c@paragraph=\count83
\c@subparagraph=\count84
\c@figure=\count85
\c@table=\count86
\abovecaptionskip=\skip41
\belowcaptionskip=\skip42
\bibindent=\dimen102
) (./3.aux)
\openout1 = `3.aux'.
LaTeX Font Info: Checking defaults for OML/cmm/m/it on input line 6.
LaTeX Font Info: ... okay on input line 6.
LaTeX Font Info: Checking defaults for T1/cmr/m/n on input line 6.
LaTeX Font Info: ... okay on input line 6.
LaTeX Font Info: Checking defaults for OT1/cmr/m/n on input line 6.
LaTeX Font Info: ... okay on input line 6.
LaTeX Font Info: Checking defaults for OMS/cmsy/m/n on input line 6.
LaTeX Font Info: ... okay on input line 6.
LaTeX Font Info: Checking defaults for OMX/cmex/m/n on input line 6.
LaTeX Font Info: ... okay on input line 6.
LaTeX Font Info: Checking defaults for U/cmr/m/n on input line 6.
LaTeX Font Info: ... okay on input line 6.
LaTeX Font Info: External font `cmex10' loaded for size
(Font) <12> on input line 8.
LaTeX Font Info: External font `cmex10' loaded for size
(Font) <8> on input line 8.
LaTeX Font Info: External font `cmex10' loaded for size
(Font) <6> on input line 8.
(./3.toc
LaTeX Font Info: External font `cmex10' loaded for size
(Font) <10.95> on input line 3.
)
\tf@toc=\write3
\openout3 = `3.toc'.
[1
{/var/lib/texmf/fonts/map/pdftex/updmap/pdftex.map}]
LaTeX Font Info: External font `cmex10' loaded for size
(Font) <9> on input line 24.
LaTeX Font Info: External font `cmex10' loaded for size
(Font) <5> on input line 24.
Underfull \hbox (badness 10000) in paragraph at lines 15--30
[]
Underfull \hbox (badness 10000) in paragraph at lines 15--30
[]
Underfull \hbox (badness 10000) in paragraph at lines 15--30
[]
Underfull \hbox (badness 10000) in paragraph at lines 15--30
[]
Underfull \hbox (badness 10000) in paragraph at lines 15--30
[]
Underfull \hbox (badness 10000) in paragraph at lines 15--30
[]
LaTeX Font Info: Try loading font information for OMS+cmr on input line 34.
(/usr/share/texlive/texmf-dist/tex/latex/base/omscmr.fd
File: omscmr.fd 2014/09/29 v2.5h Standard LaTeX font definitions
)
LaTeX Font Info: Font shape `OMS/cmr/m/n' in size <10.95> not available
(Font) Font shape `OMS/cmsy/m/n' tried instead on input line 34.
[2] [3] [4]
Overfull \hbox (83.52414pt too wide) in paragraph at lines 78--79
\OT1/cmr/m/n/10.95 This means you want a vol-ume some-thing like ./con-tain-erA
[]files/logs:/var/www/log/apache2/
[]
Overfull \hbox (49.98666pt too wide) in paragraph at lines 82--83
\OT1/cmr/m/n/10.95 As dis-cussed here: web.archive.org/web/https://github.com/m
oby/moby/issues/4361,
[]
[5] (./3.aux) )
Here is how much of TeX's memory you used:
267 strings out of 494945
3199 string characters out of 6181032
51564 words of memory out of 5000000
3626 multiletter control sequences out of 15000+600000
10198 words of font info for 36 fonts, out of 8000000 for 9000
14 hyphenation exceptions out of 8191
23i,8n,19p,690b,187s stack positions out of 5000i,500n,10000p,200000b,80000s
</usr/share/texlive/texmf-dist/fonts/type1/public/amsfonts/cm/cm
bx10.pfb></usr/share/texlive/texmf-dist/fonts/type1/public/amsfonts/cm/cmbx12.p
fb></usr/share/texlive/texmf-dist/fonts/type1/public/amsfonts/cm/cmr10.pfb></us
r/share/texlive/texmf-dist/fonts/type1/public/amsfonts/cm/cmr12.pfb></usr/share
/texlive/texmf-dist/fonts/type1/public/amsfonts/cm/cmr6.pfb></usr/share/texlive
/texmf-dist/fonts/type1/public/amsfonts/cm/cmr8.pfb></usr/share/texlive/texmf-d
ist/fonts/type1/public/amsfonts/cm/cmr9.pfb></usr/share/texlive/texmf-dist/font
s/type1/public/amsfonts/cm/cmsy10.pfb></usr/share/texlive/texmf-dist/fonts/type
1/public/amsfonts/cm/cmtt10.pfb>
Output written on 3.pdf (5 pages, 125545 bytes).
PDF statistics:
56 PDF objects out of 1000 (max. 8388607)
39 compressed objects within 1 object stream
0 named destinations out of 1000 (max. 500000)
1 words of extra memory for PDF output out of 10000 (max. 10000000)

BIN
2019/Docker_Primer/docs/3.pdf View File


+ 86
- 0
2019/Docker_Primer/docs/3.tex View File

@ -0,0 +1,86 @@
\documentclass[11pt]{article}
%Gummi|065|=)
\title{\textbf{Docker Primer}}
\author{Steak Electronics}
\date{08/30/19}
\begin{document}
\maketitle
\tableofcontents
\section{Overview}
Docker is a program in the tradition of Virtualization. However, Docker differs from a Virtual Machine, in that it uses less resources, and allows for more containers (essentially isolated OS') to run. With Docker I can run 8 different websites on a Core 2 Duo. Docker makes it trivial to transport these websites to a new machine. It's as simple as copying the docker-compose (you should be using docker compose) yml configuration, and keeping all permenant volumes, and saved files in one folder. Docker is a little more setup upfront, but promises savings in time plus interest down the line.
\section{General Notes}
It always helps to read a book on a subject, and then keep it as a Reference. I have read ``Using Docker'' By Adrian Mouat. It is a decent book. Not bad.
Here are some general tips:
\\
\\
First off, Docker is 64 bit only for i386 architecture. ARM has a separate build. There is no 32 bit, unfortunately.
\\
\\
You will want 'some' RAM. I had 1GB on a P4 machine, and that was not enough. 4GB was enough.
\\
\\
You should always use docker compose. If you read the book above, you will understand why. Docker can run on the command line (commands are somewhat complex for each container), but with a compose file, you can write everything down in a much simpler fashion. Use compose. It's a separate install, currently. Install it.\footnote{Seriously, just ignore the docker command lines. I consider them useless. More of a red herring for rookies.}
\\
\\
One of the benefits of docker, is its simplicity. There are essentially two commands you will ever need to know to use docker. Both must be run as root. One is \#docker (e.g. docker restart container\_name\_here). The other is docker-compose (e.g. \#docker-compose up -d).
\\
\\
\subsection{Docker Commands Reference}
Here is just the good stuff.
\begin{itemize}
\item docker-compose up -d (starts the containers in the docker compose file, if they aren't already started. the -d detaches from the stdout logging. You don't need to use stdout logging, you can use docker logs, but its there if you want it)
\item docker ps (lists containers running. If one fails to start, you'll see it missing from here)
\item docker logs <containername> (gives you some logging output from the container. Often enough to troubleshoot.)
\item docker exec -it <containername> /bin/bash (this will get you in a shell in the docker container. From here you can do what you need to. Most are debian, and need apt-get install less nano or whatever program you are missing. Ping is missing from possibly all containers, so if you want to test via ping, you'll have to apt-get it).
\item docker-compose restart (this will restart all containers. However, I don't recommend it. Initting containers can get corrupted this way, and also its much easier to restart a single faulty container via...)
\item docker restart <containername> (this will restart one single container.)
\item docker cp <containername>:/dir/to/file dest (you can copy files from local machine to docker, or vice versa with this. Extremely useful).
\end{itemize}
Less often, you might want to know docker kill <containername> and docker rmi -f <imagename>. The first will stop a container, the second will remove an image. If you corrupt the install of a container, the second will save you. The force switch (-f) is required. Alternatively, you can just install a container of the same type with a new container name. \footnote{This is a good way to test that your containers are built in a reproducible way. If you are able to rebuild them by deleting everything, then you likely won't have trouble down the road.}
\section{Specific Tips}
\subsection{YAML is space sensitive}
When you edit the .yml file for docker-compose, you have to hit spaces in a certain pattern (tabs not allowed). This is absurd, but just be aware. The errors are cryptic, and its often just because the spacing doesn't stick to what it expects.
\subsection{If you restart a containers namesake process, it will probably restart / reset the container}
So if you are troubleshooting an apache container, you edit some files, then /etc/init.d/apache2 restart, uh oh... You just undid all the edits you made, if they aren't in a permanent volume. You can shell in, make edits, and then exit the shell, but a service restart often resets the container.
\subsection{Use a single reverse proxy, to handle multiple websites}
There are many ways to do this. I use an nginx proxy from scratch. You can also use some containers that are built for this purpose (I personally think it's bloated but a lot of people use Jason Wilder's proxy)
\footnote{https://github.com/jwilder/nginx-proxy - A lot of people swear by this, but I think it's straying too far from the motorcycle.}
\subsection{If you use a single reverse proxy, Lets Encrypt can be done easy}
In this case scenario you would have certbot on the host and a local volume that the proxy has access to which is the webroot of the Lets Encrypt scripts. The nginx proxy entry look something like this:
\begin{verbatim}
location ^~ /.well-known {
alias /var/www/html/.well-known/;
autoindex on;
}
\end{verbatim}
And this is put in every server declaration of nginx.conf. Real simple, real easy. The docker compose of the nginx proxy is something like:
\begin{verbatim}
nginx:
image: nginx:latest
container_name: custom_name_for_my_proxy
volumes:
- ./nginx.conf:/etc/nginx/nginx.conf
- /etc/letsencrypt/:/etc/letsencrypt/
- ./webroot/:/var/www/html/
\end{verbatim}
The volumes section is extremely simple, don't be scared. There are two entries. Local and remote. You specify what folder will be the local directory which will be cloned to the host at the remote path you specify. So, the host runs certbot at /etc/letsencrypt, and this folder is cloned to the nginx proxy container, at the same location. Finally, webroot must be set in certbot, but it prompts you for this\footnote{And if you forget or get it wrong, it can be configured somewhere in /etc/letsencrypt. it's a one liner text entry).}
\subsection{Give every Container a Containername}
This makes it easier to refer to them later. All you need to do in the compose file is include container\_name: something. Much better than the gibberish they give these names if you don't include it.
\subsection{Beware of Interrupting Initting Containers}
When you first build a container, it might take 30-60 or more seconds to do whatever it needs to do. If, before then, you restart it... It may get corrupted. This has happened to me more than once. When you are testing a new container, and it doesn't seem to work for some inexplicable reason, create a container with a new name (it will create a new one), or delete the first one, and start it again.
\subsection{Put Apache or Program logs from the Container in a volume that is locally accessible}
This means you want a volume something like ./containerA\_files/logs:/var/www/log/apache2/ so that you can monitor the logs from your host machine easily. docker logs doesn't have everything.
\subsection{Only Restart Containers you need to Restart}
You can restart everything with docker-compose restart, but it's faster, and less prone to break initting containers, if you docker restart containername. Do the latter.
\subsection{Volumes Mounting Over Existing Directories}
As discussed here: web.archive.org/web/https://github.com/moby/moby/issues/4361, if you add a volume to an existing container, it will seem to delete the folder's contents. I've seen mixed behaviour with this. Sometimes it deletes it even if you start a new container with the folder... Other times it has not. In any case, just docker cp the files to the folder, then add the volume mount.
\end{document}

+ 84
- 0
2019/Docker_Primer/docs/3.tex~ View File

@ -0,0 +1,84 @@
\documentclass[11pt]{article}
%Gummi|065|=)
\title{\textbf{Docker Primer}}
\author{Steak Electronics}
\date{08/30/19}
\begin{document}
\maketitle
\tableofcontents
\section{Overview}
Docker is a program in the tradition of Virtualization. However, Docker differs from a Virtual Machine, in that it uses less resources, and allows for more containers (essentially isolated OS') to run. With Docker I can run 8 different websites on a Core 2 Duo. Docker makes it trivial to transport these websites to a new machine. It's as simple as copying the docker-compose (you should be using docker compose) yml configuration, and keeping all permenant volumes, and saved files in one folder. Docker is a little more setup upfront, but promises savings in time plus interest down the line.
\section{General Notes}
It always helps to read a book on a subject, and then keep it as a Reference. I have read ``Using Docker'' By Adrian Mouat. It is a decent book. Not bad.
Here are some general tips:
\\
\\
First off, Docker is 64 bit only for i386 architecture. ARM has a separate build. There is no 32 bit, unfortunately.
\\
\\
You will want 'some' RAM. I had 1GB on a P4 machine, and that was not enough. 4GB was enough.
\\
\\
You should always use docker compose. If you read the book above, you will understand why. Docker can run on the command line (commands are somewhat complex for each container), but with a compose file, you can write everything down in a much simpler fashion. Use compose. It's a separate install, currently. Install it.\footnote{Seriously, just ignore the docker command lines. I consider them useless. More of a red herring for rookies.}
\\
\\
One of the benefits of docker, is its simplicity. There are essentially two commands you will ever need to know to use docker. Both must be run as root. One is \#docker (e.g. docker restart container\_name\_here). The other is docker-compose (e.g. \#docker-compose up -d).
\\
\\
\subsection{Docker Commands Reference}
Here is just the good stuff.
\begin{itemize}
\item docker-compose up -d (starts the containers in the docker compose file, if they aren't already started. the -d detaches from the stdout logging. You don't need to use stdout logging, you can use docker logs, but its there if you want it)
\item docker ps (lists containers running. If one fails to start, you'll see it missing from here)
\item docker logs <containername> (gives you some logging output from the container. Often enough to troubleshoot.)
\item docker exec -it <containername> /bin/bash (this will get you in a shell in the docker container. From here you can do what you need to. Most are debian, and need apt-get install less nano or whatever program you are missing. Ping is missing from possibly all containers, so if you want to test via ping, you'll have to apt-get it).
\item docker-compose restart (this will restart all containers. However, I don't recommend it. Initting containers can get corrupted this way, and also its much easier to restart a single faulty container via...)
\item docker restart <containername> (this will restart one single container.)
\item docker cp <containername>:/dir/to/file dest (you can copy files from local machine to docker, or vice versa with this. Extremely useful).
\end{itemize}
Less often, you might want to know docker kill <containername> and docker rmi -f <imagename>. The first will stop a container, the second will remove an image. If you corrupt the install of a container, the second will save you. The force switch (-f) is required. Alternatively, you can just install a container of the same type with a new container name. \footnote{This is a good way to test that your containers are built in a reproducible way. If you are able to rebuild them by deleting everything, then you likely won't have trouble down the road.}
\section{Specific Tips}
\subsection{YAML is space sensitive}
When you edit the .yml file for docker-compose, you have to hit spaces in a certain pattern (tabs not allowed). This is absurd, but just be aware. The errors are cryptic, and its often just because the spacing doesn't stick to what it expects.
\subsection{If you restart a containers namesake process, it will probably restart / reset the container}
So if you are troubleshooting an apache container, you edit some files, then /etc/init.d/apache2 restart, uh oh... You just undid all the edits you made, if they aren't in a permanent volume. You can shell in, make edits, and then exit the shell, but a service restart often resets the container.
\subsection{Use a single reverse proxy, to handle multiple websites}
There are many ways to do this. I use an nginx proxy from scratch. You can also use some containers that are built for this purpose (I personally think it's bloated but a lot of people use Jason Wilder's proxy)
\footnote{https://github.com/jwilder/nginx-proxy - A lot of people swear by this, but I think it's straying too far from the motorcycle.}
\subsection{If you use a single reverse proxy, Lets Encrypt can be done easy}
In this case scenario you would have certbot on the host and a local volume that the proxy has access to which is the webroot of the Lets Encrypt scripts. The nginx proxy entry look something like this:
\begin{verbatim}
location ^~ /.well-known {
alias /var/www/html/.well-known/;
autoindex on;
}
\end{verbatim}
And this is put in every server declaration of nginx.conf. Real simple, real easy. The docker compose of the nginx proxy is something like:
\begin{verbatim}
nginx:
image: nginx:latest
container_name: custom_name_for_my_proxy
volumes:
- ./nginx.conf:/etc/nginx/nginx.conf
- /etc/letsencrypt/:/etc/letsencrypt/
- ./webroot/:/var/www/html/
\end{verbatim}
The volumes section is extremely simple, don't be scared. There are two entries. Local and remote. You specify what folder will be the local directory which will be cloned to the host at the remote path you specify. So, the host runs certbot at /etc/letsencrypt, and this folder is cloned to the nginx proxy container, at the same location. Finally, webroot must be set in certbot, but it prompts you for this\footnote{And if you forget or get it wrong, it can be configured somewhere in /etc/letsencrypt. it's a one liner text entry).}
\subsection{Give every Container a Containername}
This makes it easier to refer to them later. All you need to do in the compose file is include container\_name: something. Much better than the gibberish they give these names if you don't include it.
\subsection{Beware of Interrupting Initting Containers}
When you first build a container, it might take 30-60 or more seconds to do whatever it needs to do. If, before then, you restart it... It may get corrupted. This has happened to me more than once. When you are testing a new container, and it doesn't seem to work for some inexplicable reason, create a container with a new name (it will create a new one), or delete the first one, and start it again.
\subsection{Put Apache or Program logs from the Container in a volume that is locally accessible}
This means you want a volume something like ./containerA\_files/logs:/var/www/log/apache2/ so that you can monitor the logs from your host machine easily. docker logs doesn't have everything.
\subsection{Only Restart Containers you need to Restart}
You can restart everything with docker-compose restart, but it's faster, and less prone to break initting containers, if you docker restart containername. Do the latter.
\end{document}

+ 13
- 0
2019/Docker_Primer/docs/3.toc View File

@ -0,0 +1,13 @@
\contentsline {section}{\numberline {1}Overview}{1}
\contentsline {section}{\numberline {2}General Notes}{2}
\contentsline {subsection}{\numberline {2.1}Docker Commands Reference}{2}
\contentsline {section}{\numberline {3}Specific Tips}{3}
\contentsline {subsection}{\numberline {3.1}YAML is space sensitive}{3}
\contentsline {subsection}{\numberline {3.2}If you restart a containers namesake process, it will probably restart / reset the container}{3}
\contentsline {subsection}{\numberline {3.3}Use a single reverse proxy, to handle multiple websites}{4}
\contentsline {subsection}{\numberline {3.4}If you use a single reverse proxy, Lets Encrypt can be done easy}{4}
\contentsline {subsection}{\numberline {3.5}Give every Container a Containername}{5}
\contentsline {subsection}{\numberline {3.6}Beware of Interrupting Initting Containers}{5}
\contentsline {subsection}{\numberline {3.7}Put Apache or Program logs from the Container in a volume that is locally accessible}{5}
\contentsline {subsection}{\numberline {3.8}Only Restart Containers you need to Restart}{5}
\contentsline {subsection}{\numberline {3.9}Volumes Mounting Over Existing Directories}{5}

+ 14
- 0
2019/Docker_Primer/docs/4.aux View File

@ -0,0 +1,14 @@
\relax
\@writefile{toc}{\contentsline {section}{\numberline {1}Overview}{1}}
\@writefile{toc}{\contentsline {section}{\numberline {2}General Notes}{1}}
\@writefile{toc}{\contentsline {subsection}{\numberline {2.1}Docker Commands Reference}{2}}
\@writefile{toc}{\contentsline {section}{\numberline {3}Specific Tips}{3}}
\@writefile{toc}{\contentsline {subsection}{\numberline {3.1}YAML is space sensitive}{3}}
\@writefile{toc}{\contentsline {subsection}{\numberline {3.2}If you restart a containers namesake process, it will probably restart / reset the container}{4}}
\@writefile{toc}{\contentsline {subsection}{\numberline {3.3}Use a single reverse proxy, to handle multiple websites}{4}}
\@writefile{toc}{\contentsline {subsection}{\numberline {3.4}If you use a single reverse proxy, Lets Encrypt can be done easy}{4}}
\@writefile{toc}{\contentsline {subsection}{\numberline {3.5}Give every Container a Containername}{5}}
\@writefile{toc}{\contentsline {subsection}{\numberline {3.6}Beware of Interrupting Initting Containers}{5}}
\@writefile{toc}{\contentsline {subsection}{\numberline {3.7}Put Apache or Program logs from the Container in a volume that is locally accessible}{5}}
\@writefile{toc}{\contentsline {subsection}{\numberline {3.8}Only Restart Containers you need to Restart}{5}}
\@writefile{toc}{\contentsline {subsection}{\numberline {3.9}Volumes Mounting Over Existing Directories}{6}}

+ 243
- 0
2019/Docker_Primer/docs/4.log View File

@ -0,0 +1,243 @@
This is pdfTeX, Version 3.14159265-2.6-1.40.17 (TeX Live 2016/Debian) (preloaded format=pdflatex 2019.8.17) 15 DEC 2019 20:13
entering extended mode
restricted \write18 enabled.
%&-line parsing enabled.
**/home/layoutdev/Desktop/code/documentation_general/IT_Articles/2019/Docker_Pr
imer/docs/4.tex
(/home/layoutdev/Desktop/code/documentation_general/IT_Articles/2019/Docker_Pri
mer/docs/4.tex
LaTeX2e <2017/01/01> patch level 3
Babel <3.9r> and hyphenation patterns for 3 language(s) loaded.
(/usr/share/texlive/texmf-dist/tex/latex/base/article.cls
Document Class: article 2014/09/29 v1.4h Standard LaTeX document class
(/usr/share/texlive/texmf-dist/tex/latex/base/size11.clo
File: size11.clo 2014/09/29 v1.4h Standard LaTeX file (size option)
)
\c@part=\count79
\c@section=\count80
\c@subsection=\count81
\c@subsubsection=\count82
\c@paragraph=\count83
\c@subparagraph=\count84
\c@figure=\count85
\c@table=\count86
\abovecaptionskip=\skip41
\belowcaptionskip=\skip42
\bibindent=\dimen102
)
(/usr/share/texlive/texmf-dist/tex/latex/xcolor/xcolor.sty
Package: xcolor 2016/05/11 v2.12 LaTeX color extensions (UK)
(/usr/share/texlive/texmf-dist/tex/latex/graphics-cfg/color.cfg
File: color.cfg 2016/01/02 v1.6 sample color configuration
)
Package xcolor Info: Driver file: pdftex.def on input line 225.
(/usr/share/texlive/texmf-dist/tex/latex/graphics-def/pdftex.def
File: pdftex.def 2017/01/12 v0.06k Graphics/color for pdfTeX
(/usr/share/texlive/texmf-dist/tex/generic/oberdiek/infwarerr.sty
Package: infwarerr 2016/05/16 v1.4 Providing info/warning/error messages (HO)
)
(/usr/share/texlive/texmf-dist/tex/generic/oberdiek/ltxcmds.sty
Package: ltxcmds 2016/05/16 v1.23 LaTeX kernel commands for general use (HO)
)
\Gread@gobject=\count87
)
Package xcolor Info: Model `cmy' substituted by `cmy0' on input line 1348.
Package xcolor Info: Model `hsb' substituted by `rgb' on input line 1352.
Package xcolor Info: Model `RGB' extended on input line 1364.
Package xcolor Info: Model `HTML' substituted by `rgb' on input line 1366.
Package xcolor Info: Model `Hsb' substituted by `hsb' on input line 1367.
Package xcolor Info: Model `tHsb' substituted by `hsb' on input line 1368.
Package xcolor Info: Model `HSB' substituted by `hsb' on input line 1369.
Package xcolor Info: Model `Gray' substituted by `gray' on input line 1370.
Package xcolor Info: Model `wave' substituted by `hsb' on input line 1371.
)
(/usr/share/texlive/texmf-dist/tex/latex/geometry/geometry.sty
Package: geometry 2010/09/12 v5.6 Page Geometry
(/usr/share/texlive/texmf-dist/tex/latex/graphics/keyval.sty
Package: keyval 2014/10/28 v1.15 key=value parser (DPC)
\KV@toks@=\toks14
)
(/usr/share/texlive/texmf-dist/tex/generic/oberdiek/ifpdf.sty
Package: ifpdf 2016/05/14 v3.1 Provides the ifpdf switch
)
(/usr/share/texlive/texmf-dist/tex/generic/oberdiek/ifvtex.sty
Package: ifvtex 2016/05/16 v1.6 Detect VTeX and its facilities (HO)
Package ifvtex Info: VTeX not detected.
)
(/usr/share/texlive/texmf-dist/tex/generic/ifxetex/ifxetex.sty
Package: ifxetex 2010/09/12 v0.6 Provides ifxetex conditional
)
\Gm@cnth=\count88
\Gm@cntv=\count89
\c@Gm@tempcnt=\count90
\Gm@bindingoffset=\dimen103
\Gm@wd@mp=\dimen104
\Gm@odd@mp=\dimen105
\Gm@even@mp=\dimen106
\Gm@layoutwidth=\dimen107
\Gm@layoutheight=\dimen108
\Gm@layouthoffset=\dimen109
\Gm@layoutvoffset=\dimen110
\Gm@dimlist=\toks15
) (./4.aux)
\openout1 = `4.aux'.
LaTeX Font Info: Checking defaults for OML/cmm/m/it on input line 9.
LaTeX Font Info: ... okay on input line 9.
LaTeX Font Info: Checking defaults for T1/cmr/m/n on input line 9.
LaTeX Font Info: ... okay on input line 9.
LaTeX Font Info: Checking defaults for OT1/cmr/m/n on input line 9.
LaTeX Font Info: ... okay on input line 9.
LaTeX Font Info: Checking defaults for OMS/cmsy/m/n on input line 9.
LaTeX Font Info: ... okay on input line 9.
LaTeX Font Info: Checking defaults for OMX/cmex/m/n on input line 9.
LaTeX Font Info: ... okay on input line 9.
LaTeX Font Info: Checking defaults for U/cmr/m/n on input line 9.
LaTeX Font Info: ... okay on input line 9.
(/usr/share/texlive/texmf-dist/tex/context/base/mkii/supp-pdf.mkii
[Loading MPS to PDF converter (version 2006.09.02).]
\scratchcounter=\count91
\scratchdimen=\dimen111
\scratchbox=\box26
\nofMPsegments=\count92
\nofMParguments=\count93
\everyMPshowfont=\toks16
\MPscratchCnt=\count94
\MPscratchDim=\dimen112
\MPnumerator=\count95
\makeMPintoPDFobject=\count96
\everyMPtoPDFconversion=\toks17
)
*geometry* detected driver: dvips
*geometry* verbose mode - [ preamble ] result:
* driver: dvips
* paper: custom
* layout: <same size as paper>
* layoutoffset:(h,v)=(0.0pt,0.0pt)
* vratio: 1:1
* modes:
* h-part:(L,W,R)=(54.2025pt, 325.215pt, 54.2025pt)
* v-part:(T,H,B)=(79.49689pt, 491.43622pt, 79.49689pt)
* \paperwidth=433.62pt
* \paperheight=650.43pt
* \textwidth=325.215pt
* \textheight=491.43622pt
* \oddsidemargin=-18.06749pt
* \evensidemargin=-18.06749pt
* \topmargin=-29.7731pt
* \headheight=12.0pt
* \headsep=25.0pt
* \topskip=11.0pt
* \footskip=30.0pt
* \marginparwidth=59.0pt
* \marginparsep=10.0pt
* \columnsep=10.0pt
* \skip\footins=10.0pt plus 4.0pt minus 2.0pt
* \hoffset=0.0pt
* \voffset=0.0pt
* \mag=1000
* \@twocolumnfalse
* \@twosidefalse
* \@mparswitchfalse
* \@reversemarginfalse
* (1in=72.27pt=25.4mm, 1cm=28.453pt)
LaTeX Font Info: External font `cmex10' loaded for size
(Font) <12> on input line 11.
LaTeX Font Info: External font `cmex10' loaded for size
(Font) <8> on input line 11.
LaTeX Font Info: External font `cmex10' loaded for size
(Font) <6> on input line 11.
(./4.toc)
\tf@toc=\write3
\openout3 = `4.toc'.
LaTeX Font Info: External font `cmex10' loaded for size
(Font) <10.95> on input line 30.
LaTeX Font Info: External font `cmex10' loaded for size
(Font) <9> on input line 30.
LaTeX Font Info: External font `cmex10' loaded for size
(Font) <5> on input line 30.
Underfull \hbox (badness 10000) in paragraph at lines 21--36
[]
Underfull \hbox (badness 10000) in paragraph at lines 21--36
[]
Underfull \hbox (badness 10000) in paragraph at lines 21--36
[]
Underfull \hbox (badness 10000) in paragraph at lines 21--36
[]
Underfull \hbox (badness 10000) in paragraph at lines 21--36
[]
Underfull \hbox (badness 10000) in paragraph at lines 21--36
[]
[1
Non-PDF special ignored!
{/var/lib/texmf/fonts/map/pdftex/updmap/pdftex.map}]
LaTeX Font Info: Try loading font information for OMS+cmr on input line 41.
(/usr/share/texlive/texmf-dist/tex/latex/base/omscmr.fd
File: omscmr.fd 2014/09/29 v2.5h Standard LaTeX font definitions
)
LaTeX Font Info: Font shape `OMS/cmr/m/n' in size <10.95> not available
(Font) Font shape `OMS/cmsy/m/n' tried instead on input line 41.
[2] [3] [4]
Overfull \hbox (135.30914pt too wide) in paragraph at lines 99--100
[]\OT1/cmr/m/n/10.95 This means you want a vol-ume some-thing like ./con-tain-e
rA[]files/logs:/var/www/log/apache2/
[]
[5]
Overfull \hbox (101.77167pt too wide) in paragraph at lines 107--108
[]\OT1/cmr/m/n/10.95 As dis-cussed here: web.archive.org/web/https://github.com
/moby/moby/issues/4361,
[]
[6] (./4.aux) )
Here is how much of TeX's memory you used:
1964 strings out of 494945
25834 string characters out of 6181032
91869 words of memory out of 5000000
5282 multiletter control sequences out of 15000+600000
9890 words of font info for 35 fonts, out of 8000000 for 9000
14 hyphenation exceptions out of 8191
24i,8n,35p,690b,247s stack positions out of 5000i,500n,10000p,200000b,80000s
</usr/share/texlive/texmf-dist/fonts/type1/public/amsfonts/cm/cm
bx12.pfb></usr/share/texlive/texmf-dist/fonts/type1/public/amsfonts/cm/cmr10.pf
b></usr/share/texlive/texmf-dist/fonts/type1/public/amsfonts/cm/cmr12.pfb></usr
/share/texlive/texmf-dist/fonts/type1/public/amsfonts/cm/cmr6.pfb></usr/share/t
exlive/texmf-dist/fonts/type1/public/amsfonts/cm/cmr8.pfb></usr/share/texlive/t
exmf-dist/fonts/type1/public/amsfonts/cm/cmr9.pfb></usr/share/texlive/texmf-dis
t/fonts/type1/public/amsfonts/cm/cmsy10.pfb></usr/share/texlive/texmf-dist/font
s/type1/public/amsfonts/cm/cmtt10.pfb>
Output written on 4.pdf (6 pages, 112299 bytes).
PDF statistics:
55 PDF objects out of 1000 (max. 8388607)
38 compressed objects within 1 object stream
0 named destinations out of 1000 (max. 500000)
1 words of extra memory for PDF output out of 10000 (max. 10000000)

BIN
2019/Docker_Primer/docs/4.pdf View File


+ 111
- 0
2019/Docker_Primer/docs/4.tex View File

@ -0,0 +1,111 @@
\documentclass[11pt]{article}
%Gummi|065|=)
\usepackage{xcolor}
\usepackage[vcentering,dvips]{geometry}
\geometry{papersize={6in,9in},total={4.5in,6.8in}}
\title{\textbf{Docker Primer}}
\author{Steak Electronics}
\date{08/30/19}
\begin{document}
\maketitle
\tableofcontents
\textcolor{green!60!blue!70}{
\section{Overview}}
Docker is a program in the tradition of Virtualization. However, Docker differs from a Virtual Machine, in that it uses less resources, and allows for more containers (essentially isolated OS') to run. With Docker I can run 8 different websites on a Core 2 Duo. Docker makes it trivial to transport these websites to a new machine. It's as simple as copying the docker-compose (you should be using docker compose) yml configuration, and keeping all permenant volumes, and saved files in one folder. Docker is a little more setup upfront, but promises savings in time plus interest down the line.
\textcolor{green!60!blue!70}{
\section{General Notes}}
It always helps to read a book on a subject, and then keep it as a Reference. I have read ``Using Docker'' By Adrian Mouat. It is a decent book. Not bad.
Here are some general tips:
\\
\\
First off, Docker is 64 bit only for i386 architecture. ARM has a separate build. There is no 32 bit, unfortunately.
\\
\\
You will want 'some' RAM. I had 1GB on a P4 machine, and that was not enough. 4GB was enough.
\\
\\
You should always use docker compose. If you read the book above, you will understand why. Docker can run on the command line (commands are somewhat complex for each container), but with a compose file, you can write everything down in a much simpler fashion. Use compose. It's a separate install, currently. Install it.\footnote{Seriously, just ignore the docker command lines. I consider them useless. More of a red herring for rookies.}
\\
\\
One of the benefits of docker, is its simplicity. There are essentially two commands you will ever need to know to use docker. Both must be run as root. One is \#docker (e.g. docker restart container\_name\_here). The other is docker-compose (e.g. \#docker-compose up -d).
\\
\\
\textcolor{green!60!blue!70}{
\subsection{Docker Commands Reference}}
Here is just the good stuff.
\begin{itemize}
\item docker-compose up -d (starts the containers in the docker compose file, if they aren't already started. the -d detaches from the stdout logging. You don't need to use stdout logging, you can use docker logs, but its there if you want it)
\item docker ps (lists containers running. If one fails to start, you'll see it missing from here)
\item docker logs <containername> (gives you some logging output from the container. Often enough to troubleshoot.)
\item docker exec -it <containername> /bin/bash (this will get you in a shell in the docker container. From here you can do what you need to. Most are debian, and need apt-get install less nano or whatever program you are missing. Ping is missing from possibly all containers, so if you want to test via ping, you'll have to apt-get it).
\item docker-compose restart (this will restart all containers. However, I don't recommend it. Initting containers can get corrupted this way, and also its much easier to restart a single faulty container via...)
\item docker restart <containername> (this will restart one single container.)
\item docker cp <containername>:/dir/to/file dest (you can copy files from local machine to docker, or vice versa with this. Extremely useful).
\end{itemize}
Less often, you might want to know docker kill <containername> and docker rmi -f <imagename>. The first will stop a container, the second will remove an image. If you corrupt the install of a container, the second will save you. The force switch (-f) is required. Alternatively, you can just install a container of the same type with a new container name. \footnote{This is a good way to test that your containers are built in a reproducible way. If you are able to rebuild them by deleting everything, then you likely won't have trouble down the road.}
\textcolor{green!60!blue!70}{
\section{Specific Tips}}
\textcolor{green!60!blue!70}{
\subsection{YAML is space sensitive}}
When you edit the .yml file for docker-compose, you have to hit spaces in a certain pattern (tabs not allowed). This is absurd, but just be aware. The errors are cryptic, and its often just because the spacing doesn't stick to what it expects.
\textcolor{green!60!blue!70}{
\subsection{If you restart a containers namesake process, it will probably restart / reset the container}}
So if you are troubleshooting an apache container, you edit some files, then /etc/init.d/apache2 restart, uh oh... You just undid all the edits you made, if they aren't in a permanent volume. You can shell in, make edits, and then exit the shell, but a service restart often resets the container.
\textcolor{green!60!blue!70}{
\subsection{Use a single reverse proxy, to handle multiple websites}}
There are many ways to do this. I use an nginx proxy from scratch. You can also use some containers that are built for this purpose (I personally think it's bloated but a lot of people use Jason Wilder's proxy)
\footnote{https://github.com/jwilder/nginx-proxy - A lot of people swear by this, but I think it's straying too far from the motorcycle.}
\textcolor{green!60!blue!70}{
\subsection{If you use a single reverse proxy, Lets Encrypt can be done easy}}
In this case scenario you would have certbot on the host and a local volume that the proxy has access to which is the webroot of the Lets Encrypt scripts. The nginx proxy entry look something like this:
\begin{verbatim}
location ^~ /.well-known {
alias /var/www/html/.well-known/;
autoindex on;
}
\end{verbatim}
And this is put in every server declaration of nginx.conf. Real simple, real easy. The docker compose of the nginx proxy is something like:
\begin{verbatim}
nginx:
image: nginx:latest
container_name: custom_name_for_my_proxy
volumes:
- ./nginx.conf:/etc/nginx/nginx.conf
- /etc/letsencrypt/:/etc/letsencrypt/
- ./webroot/:/var/www/html/
\end{verbatim}
The volumes section is extremely simple, don't be scared. There are two entries. Local and remote. You specify what folder will be the local directory which will be cloned to the host at the remote path you specify. So, the host runs certbot at /etc/letsencrypt, and this folder is cloned to the nginx proxy container, at the same location. Finally, webroot must be set in certbot, but it prompts you for this\footnote{And if you forget or get it wrong, it can be configured somewhere in /etc/letsencrypt. it's a one liner text entry).}
\textcolor{green!60!blue!70}{
\subsection{Give every Container a Containername}}
This makes it easier to refer to them later. All you need to do in the compose file is include container\_name: something. Much better than the gibberish they give these names if you don't include it.
\textcolor{green!60!blue!70}{
\subsection{Beware of Interrupting Initting Containers}}
When you first build a container, it might take 30-60 or more seconds to do whatever it needs to do. If, before then, you restart it... It may get corrupted. This has happened to me more than once. When you are testing a new container, and it doesn't seem to work for some inexplicable reason, create a container with a new name (it will create a new one), or delete the first one, and start it again.
\textcolor{green!60!blue!70}{
\subsection{Put Apache or Program logs from the Container in a volume that is locally accessible}}
This means you want a volume something like ./containerA\_files/logs:/var/www/log/apache2/ so that you can monitor the logs from your host machine easily. docker logs doesn't have everything.
\textcolor{green!60!blue!70}{
\subsection{Only Restart Containers you need to Restart}}
You can restart everything with docker-compose restart, but it's faster, and less prone to break initting containers, if you docker restart containername. Do the latter.
\textcolor{green!60!blue!70}{
\subsection{Volumes Mounting Over Existing Directories}}
As discussed here: web.archive.org/web/https://github.com/moby/moby/issues/4361, if you add a volume to an existing container, it will seem to delete the folder's contents. I've seen mixed behaviour with this. Sometimes it deletes it even if you start a new container with the folder... Other times it has not. In any case, just docker cp the files to the folder, then add the volume mount.
\end{document}

+ 86
- 0
2019/Docker_Primer/docs/4.tex~ View File

@ -0,0 +1,86 @@
\documentclass[11pt]{article}
%Gummi|065|=)
\title{\textbf{Docker Primer}}
\author{Steak Electronics}
\date{08/30/19}
\begin{document}
\maketitle
\tableofcontents
\section{Overview}
Docker is a program in the tradition of Virtualization. However, Docker differs from a Virtual Machine, in that it uses less resources, and allows for more containers (essentially isolated OS') to run. With Docker I can run 8 different websites on a Core 2 Duo. Docker makes it trivial to transport these websites to a new machine. It's as simple as copying the docker-compose (you should be using docker compose) yml configuration, and keeping all permenant volumes, and saved files in one folder. Docker is a little more setup upfront, but promises savings in time plus interest down the line.
\section{General Notes}
It always helps to read a book on a subject, and then keep it as a Reference. I have read ``Using Docker'' By Adrian Mouat. It is a decent book. Not bad.
Here are some general tips:
\\
\\
First off, Docker is 64 bit only for i386 architecture. ARM has a separate build. There is no 32 bit, unfortunately.
\\
\\
You will want 'some' RAM. I had 1GB on a P4 machine, and that was not enough. 4GB was enough.
\\
\\
You should always use docker compose. If you read the book above, you will understand why. Docker can run on the command line (commands are somewhat complex for each container), but with a compose file, you can write everything down in a much simpler fashion. Use compose. It's a separate install, currently. Install it.\footnote{Seriously, just ignore the docker command lines. I consider them useless. More of a red herring for rookies.}
\\
\\
One of the benefits of docker, is its simplicity. There are essentially two commands you will ever need to know to use docker. Both must be run as root. One is \#docker (e.g. docker restart container\_name\_here). The other is docker-compose (e.g. \#docker-compose up -d).
\\
\\
\subsection{Docker Commands Reference}
Here is just the good stuff.
\begin{itemize}
\item docker-compose up -d (starts the containers in the docker compose file, if they aren't already started. the -d detaches from the stdout logging. You don't need to use stdout logging, you can use docker logs, but its there if you want it)
\item docker ps (lists containers running. If one fails to start, you'll see it missing from here)
\item docker logs <containername> (gives you some logging output from the container. Often enough to troubleshoot.)
\item docker exec -it <containername> /bin/bash (this will get you in a shell in the docker container. From here you can do what you need to. Most are debian, and need apt-get install less nano or whatever program you are missing. Ping is missing from possibly all containers, so if you want to test via ping, you'll have to apt-get it).
\item docker-compose restart (this will restart all containers. However, I don't recommend it. Initting containers can get corrupted this way, and also its much easier to restart a single faulty container via...)
\item docker restart <containername> (this will restart one single container.)
\item docker cp <containername>:/dir/to/file dest (you can copy files from local machine to docker, or vice versa with this. Extremely useful).
\end{itemize}
Less often, you might want to know docker kill <containername> and docker rmi -f <imagename>. The first will stop a container, the second will remove an image. If you corrupt the install of a container, the second will save you. The force switch (-f) is required. Alternatively, you can just install a container of the same type with a new container name. \footnote{This is a good way to test that your containers are built in a reproducible way. If you are able to rebuild them by deleting everything, then you likely won't have trouble down the road.}
\section{Specific Tips}
\subsection{YAML is space sensitive}
When you edit the .yml file for docker-compose, you have to hit spaces in a certain pattern (tabs not allowed). This is absurd, but just be aware. The errors are cryptic, and its often just because the spacing doesn't stick to what it expects.
\subsection{If you restart a containers namesake process, it will probably restart / reset the container}
So if you are troubleshooting an apache container, you edit some files, then /etc/init.d/apache2 restart, uh oh... You just undid all the edits you made, if they aren't in a permanent volume. You can shell in, make edits, and then exit the shell, but a service restart often resets the container.
\subsection{Use a single reverse proxy, to handle multiple websites}
There are many ways to do this. I use an nginx proxy from scratch. You can also use some containers that are built for this purpose (I personally think it's bloated but a lot of people use Jason Wilder's proxy)
\footnote{https://github.com/jwilder/nginx-proxy - A lot of people swear by this, but I think it's straying too far from the motorcycle.}
\subsection{If you use a single reverse proxy, Lets Encrypt can be done easy}
In this case scenario you would have certbot on the host and a local volume that the proxy has access to which is the webroot of the Lets Encrypt scripts. The nginx proxy entry look something like this:
\begin{verbatim}
location ^~ /.well-known {
alias /var/www/html/.well-known/;
autoindex on;
}
\end{verbatim}
And this is put in every server declaration of nginx.conf. Real simple, real easy. The docker compose of the nginx proxy is something like:
\begin{verbatim}
nginx:
image: nginx:latest
container_name: custom_name_for_my_proxy
volumes:
- ./nginx.conf:/etc/nginx/nginx.conf
- /etc/letsencrypt/:/etc/letsencrypt/
- ./webroot/:/var/www/html/
\end{verbatim}
The volumes section is extremely simple, don't be scared. There are two entries. Local and remote. You specify what folder will be the local directory which will be cloned to the host at the remote path you specify. So, the host runs certbot at /etc/letsencrypt, and this folder is cloned to the nginx proxy container, at the same location. Finally, webroot must be set in certbot, but it prompts you for this\footnote{And if you forget or get it wrong, it can be configured somewhere in /etc/letsencrypt. it's a one liner text entry).}
\subsection{Give every Container a Containername}
This makes it easier to refer to them later. All you need to do in the compose file is include container\_name: something. Much better than the gibberish they give these names if you don't include it.
\subsection{Beware of Interrupting Initting Containers}
When you first build a container, it might take 30-60 or more seconds to do whatever it needs to do. If, before then, you restart it... It may get corrupted. This has happened to me more than once. When you are testing a new container, and it doesn't seem to work for some inexplicable reason, create a container with a new name (it will create a new one), or delete the first one, and start it again.
\subsection{Put Apache or Program logs from the Container in a volume that is locally accessible}
This means you want a volume something like ./containerA\_files/logs:/var/www/log/apache2/ so that you can monitor the logs from your host machine easily. docker logs doesn't have everything.
\subsection{Only Restart Containers you need to Restart}
You can restart everything with docker-compose restart, but it's faster, and less prone to break initting containers, if you docker restart containername. Do the latter.
\subsection{Volumes Mounting Over Existing Directories}
As discussed here: web.archive.org/web/https://github.com/moby/moby/issues/4361, if you add a volume to an existing container, it will seem to delete the folder's contents. I've seen mixed behaviour with this. Sometimes it deletes it even if you start a new container with the folder... Other times it has not. In any case, just docker cp the files to the folder, then add the volume mount.
\end{document}

+ 13
- 0
2019/Docker_Primer/docs/4.toc View File

@ -0,0 +1,13 @@
\contentsline {section}{\numberline {1}Overview}{1}
\contentsline {section}{\numberline {2}General Notes}{1}
\contentsline {subsection}{\numberline {2.1}Docker Commands Reference}{2}
\contentsline {section}{\numberline {3}Specific Tips}{3}
\contentsline {subsection}{\numberline {3.1}YAML is space sensitive}{3}
\contentsline {subsection}{\numberline {3.2}If you restart a containers namesake process, it will probably restart / reset the container}{4}
\contentsline {subsection}{\numberline {3.3}Use a single reverse proxy, to handle multiple websites}{4}
\contentsline {subsection}{\numberline {3.4}If you use a single reverse proxy, Lets Encrypt can be done easy}{4}
\contentsline {subsection}{\numberline {3.5}Give every Container a Containername}{5}
\contentsline {subsection}{\numberline {3.6}Beware of Interrupting Initting Containers}{5}
\contentsline {subsection}{\numberline {3.7}Put Apache or Program logs from the Container in a volume that is locally accessible}{5}
\contentsline {subsection}{\numberline {3.8}Only Restart Containers you need to Restart}{5}
\contentsline {subsection}{\numberline {3.9}Volumes Mounting Over Existing Directories}{6}

+ 14
- 0
2019/Docker_Primer/docs/5.aux View File

@ -0,0 +1,14 @@
\relax
\@writefile{toc}{\contentsline {section}{\numberline {1}Overview}{1}}
\@writefile{toc}{\contentsline {section}{\numberline {2}General Notes}{1}}
\@writefile{toc}{\contentsline {subsection}{\numberline {2.1}Docker Commands Reference}{2}}
\@writefile{toc}{\contentsline {section}{\numberline {3}Specific Tips}{3}}
\@writefile{toc}{\contentsline {subsection}{\numberline {3.1}YAML is space sensitive}{3}}
\@writefile{toc}{\contentsline {subsection}{\numberline {3.2}If you restart a containers namesake process, it will probably restart / reset the container}{4}}
\@writefile{toc}{\contentsline {subsection}{\numberline {3.3}Use a single reverse proxy, to handle multiple websites}{4}}
\@writefile{toc}{\contentsline {subsection}{\numberline {3.4}If you use a single reverse proxy, Lets Encrypt can be done easy}{4}}
\@writefile{toc}{\contentsline {subsection}{\numberline {3.5}Give every Container a Containername}{5}}
\@writefile{toc}{\contentsline {subsection}{\numberline {3.6}Beware of Interrupting Initting Containers}{5}}
\@writefile{toc}{\contentsline {subsection}{\numberline {3.7}Put Apache or Program logs from the Container in a volume that is locally accessible}{5}}
\@writefile{toc}{\contentsline {subsection}{\numberline {3.8}Only Restart Containers you need to Restart}{5}}
\@writefile{toc}{\contentsline {subsection}{\numberline {3.9}Volumes Mounting Over Existing Directories}{6}}

+ 243
- 0
2019/Docker_Primer/docs/5.log View File

@ -0,0 +1,243 @@
This is pdfTeX, Version 3.14159265-2.6-1.40.17 (TeX Live 2016/Debian) (preloaded format=pdflatex 2019.8.17) 15 DEC 2019 20:13
entering extended mode
restricted \write18 enabled.
%&-line parsing enabled.
**/home/layoutdev/Desktop/code/documentation_general/IT_Articles/2019/Docker_Pr
imer/docs/5.tex
(/home/layoutdev/Desktop/code/documentation_general/IT_Articles/2019/Docker_Pri
mer/docs/5.tex
LaTeX2e <2017/01/01> patch level 3
Babel <3.9r> and hyphenation patterns for 3 language(s) loaded.
(/usr/share/texlive/texmf-dist/tex/latex/base/article.cls
Document Class: article 2014/09/29 v1.4h Standard LaTeX document class
(/usr/share/texlive/texmf-dist/tex/latex/base/size11.clo
File: size11.clo 2014/09/29 v1.4h Standard LaTeX file (size option)
)
\c@part=\count79
\c@section=\count80
\c@subsection=\count81
\c@subsubsection=\count82
\c@paragraph=\count83
\c@subparagraph=\count84
\c@figure=\count85
\c@table=\count86
\abovecaptionskip=\skip41
\belowcaptionskip=\skip42
\bibindent=\dimen102
)
(/usr/share/texlive/texmf-dist/tex/latex/xcolor/xcolor.sty
Package: xcolor 2016/05/11 v2.12 LaTeX color extensions (UK)
(/usr/share/texlive/texmf-dist/tex/latex/graphics-cfg/color.cfg
File: color.cfg 2016/01/02 v1.6 sample color configuration
)
Package xcolor Info: Driver file: pdftex.def on input line 225.
(/usr/share/texlive/texmf-dist/tex/latex/graphics-def/pdftex.def
File: pdftex.def 2017/01/12 v0.06k Graphics/color for pdfTeX
(/usr/share/texlive/texmf-dist/tex/generic/oberdiek/infwarerr.sty
Package: infwarerr 2016/05/16 v1.4 Providing info/warning/error messages (HO)
)
(/usr/share/texlive/texmf-dist/tex/generic/oberdiek/ltxcmds.sty
Package: ltxcmds 2016/05/16 v1.23 LaTeX kernel commands for general use (HO)
)
\Gread@gobject=\count87
)
Package xcolor Info: Model `cmy' substituted by `cmy0' on input line 1348.
Package xcolor Info: Model `hsb' substituted by `rgb' on input line 1352.
Package xcolor Info: Model `RGB' extended on input line 1364.
Package xcolor Info: Model `HTML' substituted by `rgb' on input line 1366.
Package xcolor Info: Model `Hsb' substituted by `hsb' on input line 1367.
Package xcolor Info: Model `tHsb' substituted by `hsb' on input line 1368.
Package xcolor Info: Model `HSB' substituted by `hsb' on input line 1369.
Package xcolor Info: Model `Gray' substituted by `gray' on input line 1370.
Package xcolor Info: Model `wave' substituted by `hsb' on input line 1371.
)
(/usr/share/texlive/texmf-dist/tex/latex/geometry/geometry.sty
Package: geometry 2010/09/12 v5.6 Page Geometry
(/usr/share/texlive/texmf-dist/tex/latex/graphics/keyval.sty
Package: keyval 2014/10/28 v1.15 key=value parser (DPC)
\KV@toks@=\toks14
)
(/usr/share/texlive/texmf-dist/tex/generic/oberdiek/ifpdf.sty
Package: ifpdf 2016/05/14 v3.1 Provides the ifpdf switch
)
(/usr/share/texlive/texmf-dist/tex/generic/oberdiek/ifvtex.sty
Package: ifvtex 2016/05/16 v1.6 Detect VTeX and its facilities (HO)
Package ifvtex Info: VTeX not detected.
)
(/usr/share/texlive/texmf-dist/tex/generic/ifxetex/ifxetex.sty
Package: ifxetex 2010/09/12 v0.6 Provides ifxetex conditional
)
\Gm@cnth=\count88
\Gm@cntv=\count89
\c@Gm@tempcnt=\count90
\Gm@bindingoffset=\dimen103
\Gm@wd@mp=\dimen104
\Gm@odd@mp=\dimen105
\Gm@even@mp=\dimen106
\Gm@layoutwidth=\dimen107
\Gm@layoutheight=\dimen108
\Gm@layouthoffset=\dimen109
\Gm@layoutvoffset=\dimen110
\Gm@dimlist=\toks15
)
No file 5.aux.
\openout1 = `5.aux'.
LaTeX Font Info: Checking defaults for OML/cmm/m/it on input line 9.
LaTeX Font Info: ... okay on input line 9.
LaTeX Font Info: Checking defaults for T1/cmr/m/n on input line 9.
LaTeX Font Info: ... okay on input line 9.
LaTeX Font Info: Checking defaults for OT1/cmr/m/n on input line 9.
LaTeX Font Info: ... okay on input line 9.
LaTeX Font Info: Checking defaults for OMS/cmsy/m/n on input line 9.
LaTeX Font Info: ... okay on input line 9.
LaTeX Font Info: Checking defaults for OMX/cmex/m/n on input line 9.
LaTeX Font Info: ... okay on input line 9.
LaTeX Font Info: Checking defaults for U/cmr/m/n on input line 9.
LaTeX Font Info: ... okay on input line 9.
(/usr/share/texlive/texmf-dist/tex/context/base/mkii/supp-pdf.mkii
[Loading MPS to PDF converter (version 2006.09.02).]
\scratchcounter=\count91
\scratchdimen=\dimen111
\scratchbox=\box26
\nofMPsegments=\count92
\nofMParguments=\count93
\everyMPshowfont=\toks16
\MPscratchCnt=\count94
\MPscratchDim=\dimen112
\MPnumerator=\count95
\makeMPintoPDFobject=\count96
\everyMPtoPDFconversion=\toks17
)
*geometry* detected driver: dvips
*geometry* verbose mode - [ preamble ] result:
* driver: dvips
* paper: custom
* layout: <same size as paper>
* layoutoffset:(h,v)=(0.0pt,0.0pt)
* vratio: 1:1
* modes:
* h-part:(L,W,R)=(54.2025pt, 325.215pt, 54.2025pt)
* v-part:(T,H,B)=(79.49689pt, 491.43622pt, 79.49689pt)
* \paperwidth=433.62pt
* \paperheight=650.43pt
* \textwidth=325.215pt
* \textheight=491.43622pt
* \oddsidemargin=-18.06749pt
* \evensidemargin=-18.06749pt
* \topmargin=-29.7731pt
* \headheight=12.0pt
* \headsep=25.0pt
* \topskip=11.0pt
* \footskip=30.0pt
* \marginparwidth=59.0pt
* \marginparsep=10.0pt
* \columnsep=10.0pt
* \skip\footins=10.0pt plus 4.0pt minus 2.0pt
* \hoffset=0.0pt
* \voffset=0.0pt
* \mag=1000
* \@twocolumnfalse
* \@twosidefalse
* \@mparswitchfalse
* \@reversemarginfalse
* (1in=72.27pt=25.4mm, 1cm=28.453pt)
LaTeX Font Info: External font `cmex10' loaded for size
(Font) <12> on input line 11.
LaTeX Font Info: External font `cmex10' loaded for size
(Font) <8> on input line 11.
LaTeX Font Info: External font `cmex10' loaded for size
(Font) <6> on input line 11.
No file 5.toc.
\tf@toc=\write3
\openout3 = `5.toc'.
LaTeX Font Info: External font `cmex10' loaded for size
(Font) <10.95> on input line 30.
LaTeX Font Info: External font `cmex10' loaded for size
(Font) <9> on input line 30.
LaTeX Font Info: External font `cmex10' loaded for size
(Font) <5> on input line 30.
Underfull \hbox (badness 10000) in paragraph at lines 21--36
[]
Underfull \hbox (badness 10000) in paragraph at lines 21--36
[]
Underfull \hbox (badness 10000) in paragraph at lines 21--36
[]
Underfull \hbox (badness 10000) in paragraph at lines 21--36
[]
Underfull \hbox (badness 10000) in paragraph at lines 21--36
[]
Underfull \hbox (badness 10000) in paragraph at lines 21--36
[]
[1
Non-PDF special ignored!
{/var/lib/texmf/fonts/map/pdftex/updmap/pdftex.map}]
LaTeX Font Info: Try loading font information for OMS+cmr on input line 41.
(/usr/share/texlive/texmf-dist/tex/latex/base/omscmr.fd
File: omscmr.fd 2014/09/29 v2.5h Standard LaTeX font definitions
)
LaTeX Font Info: Font shape `OMS/cmr/m/n' in size <10.95> not available
(Font) Font shape `OMS/cmsy/m/n' tried instead on input line 41.
[2] [3] [4]
Overfull \hbox (135.30914pt too wide) in paragraph at lines 99--100
[]\OT1/cmr/m/n/10.95 This means you want a vol-ume some-thing like ./con-tain-e
rA[]files/logs:/var/www/log/apache2/
[]
[5]
Overfull \hbox (101.77167pt too wide) in paragraph at lines 107--108
[]\OT1/cmr/m/n/10.95 As dis-cussed here: web.archive.org/web/https://github.com
/moby/moby/issues/4361,
[]
[6] (./5.aux) )
Here is how much of TeX's memory you used:
1960 strings out of 494945
25810 string characters out of 6181032
91869 words of memory out of 5000000
5282 multiletter control sequences out of 15000+600000
9890 words of font info for 35 fonts, out of 8000000 for 9000
14 hyphenation exceptions out of 8191
24i,8n,35p,690b,247s stack positions out of 5000i,500n,10000p,200000b,80000s
</usr/share/texlive/texmf-dist/fonts/type1/public/amsfonts/cm/cm
bx12.pfb></usr/share/texlive/texmf-dist/fonts/type1/public/amsfonts/cm/cmr10.pf
b></usr/share/texlive/texmf-dist/fonts/type1/public/amsfonts/cm/cmr12.pfb></usr
/share/texlive/texmf-dist/fonts/type1/public/amsfonts/cm/cmr6.pfb></usr/share/t
exlive/texmf-dist/fonts/type1/public/amsfonts/cm/cmr8.pfb></usr/share/texlive/t
exmf-dist/fonts/type1/public/amsfonts/cm/cmr9.pfb></usr/share/texlive/texmf-dis
t/fonts/type1/public/amsfonts/cm/cmsy10.pfb></usr/share/texlive/texmf-dist/font
s/type1/public/amsfonts/cm/cmtt10.pfb>
Output written on 5.pdf (6 pages, 112299 bytes).
PDF statistics:
55 PDF objects out of 1000 (max. 8388607)
38 compressed objects within 1 object stream
0 named destinations out of 1000 (max. 500000)
1 words of extra memory for PDF output out of 10000 (max. 10000000)

BIN
2019/Docker_Primer/docs/5.pdf View File


+ 111
- 0
2019/Docker_Primer/docs/5.tex View File

@ -0,0 +1,111 @@
\documentclass[11pt]{article}
%Gummi|065|=)
\usepackage{xcolor}
\usepackage[vcentering,dvips]{geometry}
\geometry{papersize={6in,9in},total={4.5in,6.8in}}
\title{\textbf{Docker Primer}}
\author{Steak Electronics}
\date{08/30/19}
\begin{document}
\maketitle
\tableofcontents
\textcolor{green!60!blue!70}{
\section{Overview}}
Docker is a program in the tradition of Virtualization. However, Docker differs from a Virtual Machine, in that it uses less resources, and allows for more containers (essentially isolated OS') to run. With Docker I can run 8 different websites on a Core 2 Duo. Docker makes it trivial to transport these websites to a new machine. It's as simple as copying the docker-compose (you should be using docker compose) yml configuration, and keeping all permenant volumes, and saved files in one folder. Docker is a little more setup upfront, but promises savings in time plus interest down the line.
\textcolor{green!60!blue!70}{
\section{General Notes}}
It always helps to read a book on a subject, and then keep it as a Reference. I have read ``Using Docker'' By Adrian Mouat. It is a decent book. Not bad.
Here are some general tips:
\\
\\
First off, Docker is 64 bit only for i386 architecture. ARM has a separate build. There is no 32 bit, unfortunately.
\\
\\
You will want 'some' RAM. I had 1GB on a P4 machine, and that was not enough. 4GB was enough.
\\
\\
You should always use docker compose. If you read the book above, you will understand why. Docker can run on the command line (commands are somewhat complex for each container), but with a compose file, you can write everything down in a much simpler fashion. Use compose. It's a separate install, currently. Install it.\footnote{Seriously, just ignore the docker command lines. I consider them useless. More of a red herring for rookies.}
\\
\\
One of the benefits of docker, is its simplicity. There are essentially two commands you will ever need to know to use docker. Both must be run as root. One is \#docker (e.g. docker restart container\_name\_here). The other is docker-compose (e.g. \#docker-compose up -d).
\\
\\
\textcolor{green!60!blue!70}{
\subsection{Docker Commands Reference}}
Here is just the good stuff.
\begin{itemize}
\item docker-compose up -d (starts the containers in the docker compose file, if they aren't already started. the -d detaches from the stdout logging. You don't need to use stdout logging, you can use docker logs, but its there if you want it)
\item docker ps (lists containers running. If one fails to start, you'll see it missing from here)
\item docker logs <containername> (gives you some logging output from the container. Often enough to troubleshoot.)
\item docker exec -it <containername> /bin/bash (this will get you in a shell in the docker container. From here you can do what you need to. Most are debian, and need apt-get install less nano or whatever program you are missing. Ping is missing from possibly all containers, so if you want to test via ping, you'll have to apt-get it).
\item docker-compose restart (this will restart all containers. However, I don't recommend it. Initting containers can get corrupted this way, and also its much easier to restart a single faulty container via...)
\item docker restart <containername> (this will restart one single container.)
\item docker cp <containername>:/dir/to/file dest (you can copy files from local machine to docker, or vice versa with this. Extremely useful).
\end{itemize}
Less often, you might want to know docker kill <containername> and docker rmi -f <imagename>. The first will stop a container, the second will remove an image. If you corrupt the install of a container, the second will save you. The force switch (-f) is required. Alternatively, you can just install a container of the same type with a new container name. \footnote{This is a good way to test that your containers are built in a reproducible way. If you are able to rebuild them by deleting everything, then you likely won't have trouble down the road.}
\textcolor{green!60!blue!70}{
\section{Specific Tips}}
\textcolor{green!60!blue!70}{
\subsection{YAML is space sensitive}}
When you edit the .yml file for docker-compose, you have to hit spaces in a certain pattern (tabs not allowed). This is absurd, but just be aware. The errors are cryptic, and its often just because the spacing doesn't stick to what it expects.
\textcolor{green!60!blue!70}{
\subsection{If you restart a containers namesake process, it will probably restart / reset the container}}
So if you are troubleshooting an apache container, you edit some files, then /etc/init.d/apache2 restart, uh oh... You just undid all the edits you made, if they aren't in a permanent volume. You can shell in, make edits, and then exit the shell, but a service restart often resets the container.
\textcolor{green!60!blue!70}{
\subsection{Use a single reverse proxy, to handle multiple websites}}
There are many ways to do this. I use an nginx proxy from scratch. You can also use some containers that are built for this purpose (I personally think it's bloated but a lot of people use Jason Wilder's proxy)
\footnote{https://github.com/jwilder/nginx-proxy - A lot of people swear by this, but I think it's straying too far from the motorcycle.}
\textcolor{green!60!blue!70}{
\subsection{If you use a single reverse proxy, Lets Encrypt can be done easy}}
In this case scenario you would have certbot on the host and a local volume that the proxy has access to which is the webroot of the Lets Encrypt scripts. The nginx proxy entry look something like this:
\begin{verbatim}
location ^~ /.well-known {
alias /var/www/html/.well-known/;
autoindex on;
}
\end{verbatim}
And this is put in every server declaration of nginx.conf. Real simple, real easy. The docker compose of the nginx proxy is something like:
\begin{verbatim}
nginx:
image: nginx:latest
container_name: custom_name_for_my_proxy
volumes:
- ./nginx.conf:/etc/nginx/nginx.conf
- /etc/letsencrypt/:/etc/letsencrypt/
- ./webroot/:/var/www/html/
\end{verbatim}
The volumes section is extremely simple, don't be scared. There are two entries. Local and remote. You specify what folder will be the local directory which will be cloned to the host at the remote path you specify. So, the host runs certbot at /etc/letsencrypt, and this folder is cloned to the nginx proxy container, at the same location. Finally, webroot must be set in certbot, but it prompts you for this\footnote{And if you forget or get it wrong, it can be configured somewhere in /etc/letsencrypt. it's a one liner text entry).}
\textcolor{green!60!blue!70}{
\subsection{Give every Container a Containername}}
This makes it easier to refer to them later. All you need to do in the compose file is include container\_name: something. Much better than the gibberish they give these names if you don't include it.
\textcolor{green!60!blue!70}{
\subsection{Beware of Interrupting Initting Containers}}
When you first build a container, it might take 30-60 or more seconds to do whatever it needs to do. If, before then, you restart it... It may get corrupted. This has happened to me more than once. When you are testing a new container, and it doesn't seem to work for some inexplicable reason, create a container with a new name (it will create a new one), or delete the first one, and start it again.
\textcolor{green!60!blue!70}{
\subsection{Put Apache or Program logs from the Container in a volume that is locally accessible}}
This means you want a volume something like ./containerA\_files/logs:/var/www/log/apache2/ so that you can monitor the logs from your host machine easily. docker logs doesn't have everything.
\textcolor{green!60!blue!70}{
\subsection{Only Restart Containers you need to Restart}}
You can restart everything with docker-compose restart, but it's faster, and less prone to break initting containers, if you docker restart containername. Do the latter.
\textcolor{green!60!blue!70}{
\subsection{Volumes Mounting Over Existing Directories}}
As discussed here: web.archive.org/web/https://github.com/moby/moby/issues/4361, if you add a volume to an existing container, it will seem to delete the folder's contents. I've seen mixed behaviour with this. Sometimes it deletes it even if you start a new container with the folder... Other times it has not. In any case, just docker cp the files to the folder, then add the volume mount.
\end{document}

+ 13
- 0
2019/Docker_Primer/docs/5.toc View File

@ -0,0 +1,13 @@
\contentsline {section}{\numberline {1}Overview}{1}
\contentsline {section}{\numberline {2}General Notes}{1}
\contentsline {subsection}{\numberline {2.1}Docker Commands Reference}{2}
\contentsline {section}{\numberline {3}Specific Tips}{3}
\contentsline {subsection}{\numberline {3.1}YAML is space sensitive}{3}
\contentsline {subsection}{\numberline {3.2}If you restart a containers namesake process, it will probably restart / reset the container}{4}
\contentsline {subsection}{\numberline {3.3}Use a single reverse proxy, to handle multiple websites}{4}
\contentsline {subsection}{\numberline {3.4}If you use a single reverse proxy, Lets Encrypt can be done easy}{4}
\contentsline {subsection}{\numberline {3.5}Give every Container a Containername}{5}
\contentsline {subsection}{\numberline {3.6}Beware of Interrupting Initting Containers}{5}
\contentsline {subsection}{\numberline {3.7}Put Apache or Program logs from the Container in a volume that is locally accessible}{5}
\contentsline {subsection}{\numberline {3.8}Only Restart Containers you need to Restart}{5}
\contentsline {subsection}{\numberline {3.9}Volumes Mounting Over Existing Directories}{6}

+ 14
- 0
2019/Docker_Primer/docs/6.aux View File

@ -0,0 +1,14 @@
\relax
\@writefile{toc}{\contentsline {section}{\numberline {1}Overview}{1}}
\@writefile{toc}{\contentsline {section}{\numberline {2}General Notes}{2}}
\@writefile{toc}{\contentsline {subsection}{\numberline {2.1}Docker Commands Reference}{3}}
\@writefile{toc}{\contentsline {section}{\numberline {3}Specific Tips}{4}}
\@writefile{toc}{\contentsline {subsection}{\numberline {3.1}YAML is space sensitive}{4}}
\@writefile{toc}{\contentsline {subsection}{\numberline {3.2}If you restart a containers namesake process, it will probably restart / reset the container}{4}}
\@writefile{toc}{\contentsline {subsection}{\numberline {3.3}Use a single reverse proxy, to handle multiple websites}{4}}
\@writefile{toc}{\contentsline {subsection}{\numberline {3.4}If you use a single reverse proxy, Lets Encrypt can be done easy}{5}}
\@writefile{toc}{\contentsline {subsection}{\numberline {3.5}Give every Container a Containername}{5}}
\@writefile{toc}{\contentsline {subsection}{\numberline {3.6}Beware of Interrupting Initting Containers}{6}}
\@writefile{toc}{\contentsline {subsection}{\numberline {3.7}Put Apache or Program logs from the Container in a volume that is locally accessible}{6}}
\@writefile{toc}{\contentsline {subsection}{\numberline {3.8}Only Restart Containers you need to Restart}{6}}
\@writefile{toc}{\contentsline {subsection}{\numberline {3.9}Volumes Mounting Over Existing Directories}{6}}

+ 245
- 0
2019/Docker_Primer/docs/6.log View File

@ -0,0 +1,245 @@
This is pdfTeX, Version 3.14159265-2.6-1.40.17 (TeX Live 2016/Debian) (preloaded format=pdflatex 2019.8.17) 15 DEC 2019 20:14
entering extended mode
restricted \write18 enabled.
%&-line parsing enabled.
**/home/layoutdev/Desktop/code/documentation_general/IT_Articles/2019/Docker_Pr
imer/docs/6.tex
(/home/layoutdev/Desktop/code/documentation_general/IT_Articles/2019/Docker_Pri
mer/docs/6.tex
LaTeX2e <2017/01/01> patch level 3
Babel <3.9r> and hyphenation patterns for 3 language(s) loaded.
(/usr/share/texlive/texmf-dist/tex/latex/base/article.cls
Document Class: article 2014/09/29 v1.4h Standard LaTeX document class
(/usr/share/texlive/texmf-dist/tex/latex/base/size11.clo
File: size11.clo 2014/09/29 v1.4h Standard LaTeX file (size option)
)
\c@part=\count79
\c@section=\count80
\c@subsection=\count81
\c@subsubsection=\count82
\c@paragraph=\count83
\c@subparagraph=\count84
\c@figure=\count85
\c@table=\count86
\abovecaptionskip=\skip41
\belowcaptionskip=\skip42
\bibindent=\dimen102
)
(/usr/share/texlive/texmf-dist/tex/latex/xcolor/xcolor.sty
Package: xcolor 2016/05/11 v2.12 LaTeX color extensions (UK)
(/usr/share/texlive/texmf-dist/tex/latex/graphics-cfg/color.cfg
File: color.cfg 2016/01/02 v1.6 sample color configuration
)
Package xcolor Info: Driver file: pdftex.def on input line 225.
(/usr/share/texlive/texmf-dist/tex/latex/graphics-def/pdftex.def
File: pdftex.def 2017/01/12 v0.06k Graphics/color for pdfTeX
(/usr/share/texlive/texmf-dist/tex/generic/oberdiek/infwarerr.sty
Package: infwarerr 2016/05/16 v1.4 Providing info/warning/error messages (HO)
)
(/usr/share/texlive/texmf-dist/tex/generic/oberdiek/ltxcmds.sty
Package: ltxcmds 2016/05/16 v1.23 LaTeX kernel commands for general use (HO)
)
\Gread@gobject=\count87
)
Package xcolor Info: Model `cmy' substituted by `cmy0' on input line 1348.
Package xcolor Info: Model `hsb' substituted by `rgb' on input line 1352.
Package xcolor Info: Model `RGB' extended on input line 1364.
Package xcolor Info: Model `HTML' substituted by `rgb' on input line 1366.
Package xcolor Info: Model `Hsb' substituted by `hsb' on input line 1367.
Package xcolor Info: Model `tHsb' substituted by `hsb' on input line 1368.
Package xcolor Info: Model `HSB' substituted by `hsb' on input line 1369.
Package xcolor Info: Model `Gray' substituted by `gray' on input line 1370.
Package xcolor Info: Model `wave' substituted by `hsb' on input line 1371.
)
(/usr/share/texlive/texmf-dist/tex/latex/geometry/geometry.sty
Package: geometry 2010/09/12 v5.6 Page Geometry
(/usr/share/texlive/texmf-dist/tex/latex/graphics/keyval.sty
Package: keyval 2014/10/28 v1.15 key=value parser (DPC)
\KV@toks@=\toks14
)
(/usr/share/texlive/texmf-dist/tex/generic/oberdiek/ifpdf.sty
Package: ifpdf 2016/05/14 v3.1 Provides the ifpdf switch
)
(/usr/share/texlive/texmf-dist/tex/generic/oberdiek/ifvtex.sty
Package: ifvtex 2016/05/16 v1.6 Detect VTeX and its facilities (HO)
Package ifvtex Info: VTeX not detected.
)
(/usr/share/texlive/texmf-dist/tex/generic/ifxetex/ifxetex.sty
Package: ifxetex 2010/09/12 v0.6 Provides ifxetex conditional
)
\Gm@cnth=\count88
\Gm@cntv=\count89
\c@Gm@tempcnt=\count90
\Gm@bindingoffset=\dimen103
\Gm@wd@mp=\dimen104
\Gm@odd@mp=\dimen105
\Gm@even@mp=\dimen106
\Gm@layoutwidth=\dimen107
\Gm@layoutheight=\dimen108
\Gm@layouthoffset=\dimen109
\Gm@layoutvoffset=\dimen110
\Gm@dimlist=\toks15
) (./6.aux)
\openout1 = `6.aux'.
LaTeX Font Info: Checking defaults for OML/cmm/m/it on input line 9.
LaTeX Font Info: ... okay on input line 9.
LaTeX Font Info: Checking defaults for T1/cmr/m/n on input line 9.
LaTeX Font Info: ... okay on input line 9.
LaTeX Font Info: Checking defaults for OT1/cmr/m/n on input line 9.
LaTeX Font Info: ... okay on input line 9.
LaTeX Font Info: Checking defaults for OMS/cmsy/m/n on input line 9.
LaTeX Font Info: ... okay on input line 9.
LaTeX Font Info: Checking defaults for OMX/cmex/m/n on input line 9.
LaTeX Font Info: ... okay on input line 9.
LaTeX Font Info: Checking defaults for U/cmr/m/n on input line 9.
LaTeX Font Info: ... okay on input line 9.
(/usr/share/texlive/texmf-dist/tex/context/base/mkii/supp-pdf.mkii
[Loading MPS to PDF converter (version 2006.09.02).]
\scratchcounter=\count91
\scratchdimen=\dimen111
\scratchbox=\box26
\nofMPsegments=\count92
\nofMParguments=\count93
\everyMPshowfont=\toks16
\MPscratchCnt=\count94
\MPscratchDim=\dimen112
\MPnumerator=\count95
\makeMPintoPDFobject=\count96
\everyMPtoPDFconversion=\toks17
)
*geometry* detected driver: dvips
*geometry* verbose mode - [ preamble ] result:
* driver: dvips
* paper: custom
* layout: <same size as paper>
* layoutoffset:(h,v)=(0.0pt,0.0pt)
* vratio: 1:1
* modes:
* h-part:(L,W,R)=(54.2025pt, 325.215pt, 54.2025pt)
* v-part:(T,H,B)=(79.49689pt, 491.43622pt, 79.49689pt)
* \paperwidth=433.62pt
* \paperheight=650.43pt
* \textwidth=325.215pt
* \textheight=491.43622pt
* \oddsidemargin=-18.06749pt
* \evensidemargin=-18.06749pt
* \topmargin=-29.7731pt
* \headheight=12.0pt
* \headsep=25.0pt
* \topskip=11.0pt
* \footskip=30.0pt
* \marginparwidth=59.0pt
* \marginparsep=10.0pt
* \columnsep=10.0pt
* \skip\footins=10.0pt plus 4.0pt minus 2.0pt
* \hoffset=0.0pt
* \voffset=0.0pt
* \mag=1000
* \@twocolumnfalse
* \@twosidefalse
* \@mparswitchfalse
* \@reversemarginfalse
* (1in=72.27pt=25.4mm, 1cm=28.453pt)
LaTeX Font Info: External font `cmex10' loaded for size
(Font) <12> on input line 11.
LaTeX Font Info: External font `cmex10' loaded for size
(Font) <8> on input line 11.
LaTeX Font Info: External font `cmex10' loaded for size
(Font) <6> on input line 11.
(./6.toc
LaTeX Font Info: External font `cmex10' loaded for size
(Font) <10.95> on input line 3.
)
\tf@toc=\write3
\openout3 = `6.toc'.
[1
Non-PDF special ignored!
{/var/lib/texmf/fonts/map/pdftex/updmap/pdftex.map}]
LaTeX Font Info: External font `cmex10' loaded for size
(Font) <9> on input line 30.
LaTeX Font Info: External font `cmex10' loaded for size
(Font) <5> on input line 30.
Underfull \hbox (badness 10000) in paragraph at lines 21--36
[]
Underfull \hbox (badness 10000) in paragraph at lines 21--36
[]
Underfull \hbox (badness 10000) in paragraph at lines 21--36
[]
Underfull \hbox (badness 10000) in paragraph at lines 21--36
[]
Underfull \hbox (badness 10000) in paragraph at lines 21--36
[]
Underfull \hbox (badness 10000) in paragraph at lines 21--36
[]
[2]
LaTeX Font Info: Try loading font information for OMS+cmr on input line 41.
(/usr/share/texlive/texmf-dist/tex/latex/base/omscmr.fd
File: omscmr.fd 2014/09/29 v2.5h Standard LaTeX font definitions
)
LaTeX Font Info: Font shape `OMS/cmr/m/n' in size <10.95> not available
(Font) Font shape `OMS/cmsy/m/n' tried instead on input line 41.
[3] [4] [5]
Overfull \hbox (135.30914pt too wide) in paragraph at lines 99--100
[]\OT1/cmr/m/n/10.95 This means you want a vol-ume some-thing like ./con-tain-e
rA[]files/logs:/var/www/log/apache2/
[]
Overfull \hbox (101.77167pt too wide) in paragraph at lines 107--108
[]\OT1/cmr/m/n/10.95 As dis-cussed here: web.archive.org/web/https://github.com
/moby/moby/issues/4361,
[]
[6] (./6.aux) )
Here is how much of TeX's memory you used:
1966 strings out of 494945
25858 string characters out of 6181032
91869 words of memory out of 5000000
5283 multiletter control sequences out of 15000+600000
10198 words of font info for 36 fonts, out of 8000000 for 9000
14 hyphenation exceptions out of 8191
23i,8n,35p,690b,189s stack positions out of 5000i,500n,10000p,200000b,80000s
</usr/share/texlive/texmf-dist/fonts/type1/public/amsfonts/cm/cm
bx10.pfb></usr/share/texlive/texmf-dist/fonts/type1/public/amsfonts/cm/cmbx12.p
fb></usr/share/texlive/texmf-dist/fonts/type1/public/amsfonts/cm/cmr10.pfb></us
r/share/texlive/texmf-dist/fonts/type1/public/amsfonts/cm/cmr12.pfb></usr/share
/texlive/texmf-dist/fonts/type1/public/amsfonts/cm/cmr6.pfb></usr/share/texlive
/texmf-dist/fonts/type1/public/amsfonts/cm/cmr8.pfb></usr/share/texlive/texmf-d
ist/fonts/type1/public/amsfonts/cm/cmr9.pfb></usr/share/texlive/texmf-dist/font
s/type1/public/amsfonts/cm/cmsy10.pfb></usr/share/texlive/texmf-dist/fonts/type
1/public/amsfonts/cm/cmtt10.pfb>
Output written on 6.pdf (6 pages, 126530 bytes).
PDF statistics:
59 PDF objects out of 1000 (max. 8388607)
41 compressed objects within 1 object stream
0 named destinations out of 1000 (max. 500000)
1 words of extra memory for PDF output out of 10000 (max. 10000000)

BIN
2019/Docker_Primer/docs/6.pdf View File


+ 111
- 0
2019/Docker_Primer/docs/6.tex View File

@ -0,0 +1,111 @@
\documentclass[11pt]{article}
%Gummi|065|=)
\usepackage{xcolor}
\usepackage[vcentering,dvips]{geometry}
\geometry{papersize={6in,9in},total={4.5in,6.8in}}
\title{\textbf{Docker Primer}}
\author{Steak Electronics}
\date{08/30/19}
\begin{document}
\maketitle
\tableofcontents
\textcolor{green!60!blue!70}{
\section{Overview}}
Docker is a program in the tradition of Virtualization. However, Docker differs from a Virtual Machine, in that it uses less resources, and allows for more containers (essentially isolated OS') to run. With Docker I can run 8 different websites on a Core 2 Duo. Docker makes it trivial to transport these websites to a new machine. It's as simple as copying the docker-compose (you should be using docker compose) yml configuration, and keeping all permenant volumes, and saved files in one folder. Docker is a little more setup upfront, but promises savings in time plus interest down the line.
\textcolor{green!60!blue!70}{
\section{General Notes}}
It always helps to read a book on a subject, and then keep it as a Reference. I have read ``Using Docker'' By Adrian Mouat. It is a decent book. Not bad.
Here are some general tips:
\\
\\
First off, Docker is 64 bit only for i386 architecture. ARM has a separate build. There is no 32 bit, unfortunately.
\\
\\
You will want 'some' RAM. I had 1GB on a P4 machine, and that was not enough. 4GB was enough.
\\
\\
You should always use docker compose. If you read the book above, you will understand why. Docker can run on the command line (commands are somewhat complex for each container), but with a compose file, you can write everything down in a much simpler fashion. Use compose. It's a separate install, currently. Install it.\footnote{Seriously, just ignore the docker command lines. I consider them useless. More of a red herring for rookies.}
\\
\\
One of the benefits of docker, is its simplicity. There are essentially two commands you will ever need to know to use docker. Both must be run as root. One is \#docker (e.g. docker restart container\_name\_here). The other is docker-compose (e.g. \#docker-compose up -d).
\\
\\
\textcolor{green!60!blue!70}{
\subsection{Docker Commands Reference}}
Here is just the good stuff.
\begin{itemize}
\item docker-compose up -d (starts the containers in the docker compose file, if they aren't already started. the -d detaches from the stdout logging. You don't need to use stdout logging, you can use docker logs, but its there if you want it)
\item docker ps (lists containers running. If one fails to start, you'll see it missing from here)
\item docker logs <containername> (gives you some logging output from the container. Often enough to troubleshoot.)
\item docker exec -it <containername> /bin/bash (this will get you in a shell in the docker container. From here you can do what you need to. Most are debian, and need apt-get install less nano or whatever program you are missing. Ping is missing from possibly all containers, so if you want to test via ping, you'll have to apt-get it).
\item docker-compose restart (this will restart all containers. However, I don't recommend it. Initting containers can get corrupted this way, and also its much easier to restart a single faulty container via...)
\item docker restart <containername> (this will restart one single container.)
\item docker cp <containername>:/dir/to/file dest (you can copy files from local machine to docker, or vice versa with this. Extremely useful).
\end{itemize}
Less often, you might want to know docker kill <containername> and docker rmi -f <imagename>. The first will stop a container, the second will remove an image. If you corrupt the install of a container, the second will save you. The force switch (-f) is required. Alternatively, you can just install a container of the same type with a new container name. \footnote{This is a good way to test that your containers are built in a reproducible way. If you are able to rebuild them by deleting everything, then you likely won't have trouble down the road.}
\textcolor{green!60!blue!70}{
\section{Specific Tips}}
\textcolor{green!60!blue!70}{
\subsection{YAML is space sensitive}}
When you edit the .yml file for docker-compose, you have to hit spaces in a certain pattern (tabs not allowed). This is absurd, but just be aware. The errors are cryptic, and its often just because the spacing doesn't stick to what it expects.
\textcolor{green!60!blue!70}{
\subsection{If you restart a containers namesake process, it will probably restart / reset the container}}
So if you are troubleshooting an apache container, you edit some files, then /etc/init.d/apache2 restart, uh oh... You just undid all the edits you made, if they aren't in a permanent volume. You can shell in, make edits, and then exit the shell, but a service restart often resets the container.
\textcolor{green!60!blue!70}{
\subsection{Use a single reverse proxy, to handle multiple websites}}
There are many ways to do this. I use an nginx proxy from scratch. You can also use some containers that are built for this purpose (I personally think it's bloated but a lot of people use Jason Wilder's proxy)
\footnote{https://github.com/jwilder/nginx-proxy - A lot of people swear by this, but I think it's straying too far from the motorcycle.}
\textcolor{green!60!blue!70}{
\subsection{If you use a single reverse proxy, Lets Encrypt can be done easy}}
In this case scenario you would have certbot on the host and a local volume that the proxy has access to which is the webroot of the Lets Encrypt scripts. The nginx proxy entry look something like this:
\begin{verbatim}
location ^~ /.well-known {
alias /var/www/html/.well-known/;
autoindex on;
}
\end{verbatim}
And this is put in every server declaration of nginx.conf. Real simple, real easy. The docker compose of the nginx proxy is something like:
\begin{verbatim}
nginx:
image: nginx:latest
container_name: custom_name_for_my_proxy
volumes:
- ./nginx.conf:/etc/nginx/nginx.conf
- /etc/letsencrypt/:/etc/letsencrypt/
- ./webroot/:/var/www/html/
\end{verbatim}
The volumes section is extremely simple, don't be scared. There are two entries. Local and remote. You specify what folder will be the local directory which will be cloned to the host at the remote path you specify. So, the host runs certbot at /etc/letsencrypt, and this folder is cloned to the nginx proxy container, at the same location. Finally, webroot must be set in certbot, but it prompts you for this\footnote{And if you forget or get it wrong, it can be configured somewhere in /etc/letsencrypt. it's a one liner text entry).}
\textcolor{green!60!blue!70}{
\subsection{Give every Container a Containername}}
This makes it easier to refer to them later. All you need to do in the compose file is include container\_name: something. Much better than the gibberish they give these names if you don't include it.
\textcolor{green!60!blue!70}{
\subsection{Beware of Interrupting Initting Containers}}
When you first build a container, it might take 30-60 or more seconds to do whatever it needs to do. If, before then, you restart it... It may get corrupted. This has happened to me more than once. When you are testing a new container, and it doesn't seem to work for some inexplicable reason, create a container with a new name (it will create a new one), or delete the first one, and start it again.
\textcolor{green!60!blue!70}{
\subsection{Put Apache or Program logs from the Container in a volume that is locally accessible}}
This means you want a volume something like ./containerA\_files/logs:/var/www/log/apache2/ so that you can monitor the logs from your host machine easily. docker logs doesn't have everything.
\textcolor{green!60!blue!70}{
\subsection{Only Restart Containers you need to Restart}}
You can restart everything with docker-compose restart, but it's faster, and less prone to break initting containers, if you docker restart containername. Do the latter.
\textcolor{green!60!blue!70}{
\subsection{Volumes Mounting Over Existing Directories}}
As discussed here: web.archive.org/web/https://github.com/moby/moby/issues/4361, if you add a volume to an existing container, it will seem to delete the folder's contents. I've seen mixed behaviour with this. Sometimes it deletes it even if you start a new container with the folder... Other times it has not. In any case, just docker cp the files to the folder, then add the volume mount.
\end{document}

+ 111
- 0
2019/Docker_Primer/docs/6.tex~ View File

@ -0,0 +1,111 @@
\documentclass[11pt]{article}
%Gummi|065|=)
\usepackage{xcolor}
\usepackage[vcentering,dvips]{geometry}
\geometry{papersize={6in,9in},total={4.5in,6.8in}}
\title{\textbf{Docker Primer}}
\author{Steak Electronics}
\date{08/30/19}
\begin{document}
\maketitle
\tableofcontents
\textcolor{green!60!blue!70}{
\section{Overview}}
Docker is a program in the tradition of Virtualization. However, Docker differs from a Virtual Machine, in that it uses less resources, and allows for more containers (essentially isolated OS') to run. With Docker I can run 8 different websites on a Core 2 Duo. Docker makes it trivial to transport these websites to a new machine. It's as simple as copying the docker-compose (you should be using docker compose) yml configuration, and keeping all permenant volumes, and saved files in one folder. Docker is a little more setup upfront, but promises savings in time plus interest down the line.
\textcolor{green!60!blue!70}{
\section{General Notes}}
It always helps to read a book on a subject, and then keep it as a Reference. I have read ``Using Docker'' By Adrian Mouat. It is a decent book. Not bad.
Here are some general tips:
\\
\\
First off, Docker is 64 bit only for i386 architecture. ARM has a separate build. There is no 32 bit, unfortunately.
\\
\\
You will want 'some' RAM. I had 1GB on a P4 machine, and that was not enough. 4GB was enough.
\\
\\
You should always use docker compose. If you read the book above, you will understand why. Docker can run on the command line (commands are somewhat complex for each container), but with a compose file, you can write everything down in a much simpler fashion. Use compose. It's a separate install, currently. Install it.\footnote{Seriously, just ignore the docker command lines. I consider them useless. More of a red herring for rookies.}
\\
\\
One of the benefits of docker, is its simplicity. There are essentially two commands you will ever need to know to use docker. Both must be run as root. One is \#docker (e.g. docker restart container\_name\_here). The other is docker-compose (e.g. \#docker-compose up -d).
\\
\\
\textcolor{green!60!blue!70}{
\subsection{Docker Commands Reference}}
Here is just the good stuff.
\begin{itemize}
\item docker-compose up -d (starts the containers in the docker compose file, if they aren't already started. the -d detaches from the stdout logging. You don't need to use stdout logging, you can use docker logs, but its there if you want it)
\item docker ps (lists containers running. If one fails to start, you'll see it missing from here)
\item docker logs <containername> (gives you some logging output from the container. Often enough to troubleshoot.)
\item docker exec -it <containername> /bin/bash (this will get you in a shell in the docker container. From here you can do what you need to. Most are debian, and need apt-get install less nano or whatever program you are missing. Ping is missing from possibly all containers, so if you want to test via ping, you'll have to apt-get it).
\item docker-compose restart (this will restart all containers. However, I don't recommend it. Initting containers can get corrupted this way, and also its much easier to restart a single faulty container via...)
\item docker restart <containername> (this will restart one single container.)
\item docker cp <containername>:/dir/to/file dest (you can copy files from local machine to docker, or vice versa with this. Extremely useful).
\end{itemize}
Less often, you might want to know docker kill <containername> and docker rmi -f <imagename>. The first will stop a container, the second will remove an image. If you corrupt the install of a container, the second will save you. The force switch (-f) is required. Alternatively, you can just install a container of the same type with a new container name. \footnote{This is a good way to test that your containers are built in a reproducible way. If you are able to rebuild them by deleting everything, then you likely won't have trouble down the road.}
\textcolor{green!60!blue!70}{
\section{Specific Tips}}
\textcolor{green!60!blue!70}{
\subsection{YAML is space sensitive}}
When you edit the .yml file for docker-compose, you have to hit spaces in a certain pattern (tabs not allowed). This is absurd, but just be aware. The errors are cryptic, and its often just because the spacing doesn't stick to what it expects.
\textcolor{green!60!blue!70}{
\subsection{If you restart a containers namesake process, it will probably restart / reset the container}}
So if you are troubleshooting an apache container, you edit some files, then /etc/init.d/apache2 restart, uh oh... You just undid all the edits you made, if they aren't in a permanent volume. You can shell in, make edits, and then exit the shell, but a service restart often resets the container.
\textcolor{green!60!blue!70}{
\subsection{Use a single reverse proxy, to handle multiple websites}}
There are many ways to do this. I use an nginx proxy from scratch. You can also use some containers that are built for this purpose (I personally think it's bloated but a lot of people use Jason Wilder's proxy)
\footnote{https://github.com/jwilder/nginx-proxy - A lot of people swear by this, but I think it's straying too far from the motorcycle.}
\textcolor{green!60!blue!70}{
\subsection{If you use a single reverse proxy, Lets Encrypt can be done easy}}
In this case scenario you would have certbot on the host and a local volume that the proxy has access to which is the webroot of the Lets Encrypt scripts. The nginx proxy entry look something like this:
\begin{verbatim}
location ^~ /.well-known {
alias /var/www/html/.well-known/;
autoindex on;
}
\end{verbatim}
And this is put in every server declaration of nginx.conf. Real simple, real easy. The docker compose of the nginx proxy is something like:
\begin{verbatim}
nginx:
image: nginx:latest
container_name: custom_name_for_my_proxy
volumes:
- ./nginx.conf:/etc/nginx/nginx.conf
- /etc/letsencrypt/:/etc/letsencrypt/
- ./webroot/:/var/www/html/
\end{verbatim}
The volumes section is extremely simple, don't be scared. There are two entries. Local and remote. You specify what folder will be the local directory which will be cloned to the host at the remote path you specify. So, the host runs certbot at /etc/letsencrypt, and this folder is cloned to the nginx proxy container, at the same location. Finally, webroot must be set in certbot, but it prompts you for this\footnote{And if you forget or get it wrong, it can be configured somewhere in /etc/letsencrypt. it's a one liner text entry).}
\textcolor{green!60!blue!70}{
\subsection{Give every Container a Containername}}
This makes it easier to refer to them later. All you need to do in the compose file is include container\_name: something. Much better than the gibberish they give these names if you don't include it.
\textcolor{green!60!blue!70}{
\subsection{Beware of Interrupting Initting Containers}}
When you first build a container, it might take 30-60 or more seconds to do whatever it needs to do. If, before then, you restart it... It may get corrupted. This has happened to me more than once. When you are testing a new container, and it doesn't seem to work for some inexplicable reason, create a container with a new name (it will create a new one), or delete the first one, and start it again.
\textcolor{green!60!blue!70}{
\subsection{Put Apache or Program logs from the Container in a volume that is locally accessible}}
This means you want a volume something like ./containerA\_files/logs:/var/www/log/apache2/ so that you can monitor the logs from your host machine easily. docker logs doesn't have everything.
\textcolor{green!60!blue!70}{
\subsection{Only Restart Containers you need to Restart}}
You can restart everything with docker-compose restart, but it's faster, and less prone to break initting containers, if you docker restart containername. Do the latter.
\textcolor{green!60!blue!70}{
\subsection{Volumes Mounting Over Existing Directories}}
As discussed here: web.archive.org/web/https://github.com/moby/moby/issues/4361, if you add a volume to an existing container, it will seem to delete the folder's contents. I've seen mixed behaviour with this. Sometimes it deletes it even if you start a new container with the folder... Other times it has not. In any case, just docker cp the files to the folder, then add the volume mount.
\end{document}

+ 13
- 0
2019/Docker_Primer/docs/6.toc View File

@ -0,0 +1,13 @@
\contentsline {section}{\numberline {1}Overview}{1}
\contentsline {section}{\numberline {2}General Notes}{2}
\contentsline {subsection}{\numberline {2.1}Docker Commands Reference}{3}
\contentsline {section}{\numberline {3}Specific Tips}{4}
\contentsline {subsection}{\numberline {3.1}YAML is space sensitive}{4}
\contentsline {subsection}{\numberline {3.2}If you restart a containers namesake process, it will probably restart / reset the container}{4}
\contentsline {subsection}{\numberline {3.3}Use a single reverse proxy, to handle multiple websites}{4}
\contentsline {subsection}{\numberline {3.4}If you use a single reverse proxy, Lets Encrypt can be done easy}{5}
\contentsline {subsection}{\numberline {3.5}Give every Container a Containername}{5}
\contentsline {subsection}{\numberline {3.6}Beware of Interrupting Initting Containers}{6}
\contentsline {subsection}{\numberline {3.7}Put Apache or Program logs from the Container in a volume that is locally accessible}{6}
\contentsline {subsection}{\numberline {3.8}Only Restart Containers you need to Restart}{6}
\contentsline {subsection}{\numberline {3.9}Volumes Mounting Over Existing Directories}{6}

+ 14
- 0
2019/Docker_Primer/docs/7.aux View File

@ -0,0 +1,14 @@
\relax
\@writefile{toc}{\contentsline {section}{\numberline {1}Overview}{1}}
\@writefile{toc}{\contentsline {section}{\numberline {2}General Notes}{2}}
\@writefile{toc}{\contentsline {subsection}{\numberline {2.1}Docker Commands Reference}{3}}
\@writefile{toc}{\contentsline {section}{\numberline {3}Specific Tips}{4}}
\@writefile{toc}{\contentsline {subsection}{\numberline {3.1}YAML is space sensitive}{4}}
\@writefile{toc}{\contentsline {subsection}{\numberline {3.2}If you restart a containers namesake process, it will probably restart / reset the container}{4}}
\@writefile{toc}{\contentsline {subsection}{\numberline {3.3}Use a single reverse proxy, to handle multiple websites}{4}}
\@writefile{toc}{\contentsline {subsection}{\numberline {3.4}If you use a single reverse proxy, Lets Encrypt can be done easy}{5}}
\@writefile{toc}{\contentsline {subsection}{\numberline {3.5}Give every Container a Containername}{5}}
\@writefile{toc}{\contentsline {subsection}{\numberline {3.6}Beware of Interrupting Initting Containers}{6}}
\@writefile{toc}{\contentsline {subsection}{\numberline {3.7}Put Apache or Program logs from the Container in a volume that is locally accessible}{6}}
\@writefile{toc}{\contentsline {subsection}{\numberline {3.8}Only Restart Containers you need to Restart}{6}}
\@writefile{toc}{\contentsline {subsection}{\numberline {3.9}Volumes Mounting Over Existing Directories}{6}}

+ 245
- 0
2019/Docker_Primer/docs/7.log View File

@ -0,0 +1,245 @@
This is pdfTeX, Version 3.14159265-2.6-1.40.17 (TeX Live 2016/Debian) (preloaded format=pdflatex 2019.8.17) 15 DEC 2019 20:16
entering extended mode
restricted \write18 enabled.
%&-line parsing enabled.
**/home/layoutdev/Desktop/code/documentation_general/IT_Articles/2019/Docker_Pr
imer/docs/7.tex
(/home/layoutdev/Desktop/code/documentation_general/IT_Articles/2019/Docker_Pri
mer/docs/7.tex
LaTeX2e <2017/01/01> patch level 3
Babel <3.9r> and hyphenation patterns for 3 language(s) loaded.
(/usr/share/texlive/texmf-dist/tex/latex/base/article.cls
Document Class: article 2014/09/29 v1.4h Standard LaTeX document class
(/usr/share/texlive/texmf-dist/tex/latex/base/size11.clo
File: size11.clo 2014/09/29 v1.4h Standard LaTeX file (size option)
)
\c@part=\count79
\c@section=\count80
\c@subsection=\count81
\c@subsubsection=\count82
\c@paragraph=\count83
\c@subparagraph=\count84
\c@figure=\count85
\c@table=\count86
\abovecaptionskip=\skip41
\belowcaptionskip=\skip42
\bibindent=\dimen102
)
(/usr/share/texlive/texmf-dist/tex/latex/xcolor/xcolor.sty
Package: xcolor 2016/05/11 v2.12 LaTeX color extensions (UK)
(/usr/share/texlive/texmf-dist/tex/latex/graphics-cfg/color.cfg
File: color.cfg 2016/01/02 v1.6 sample color configuration
)
Package xcolor Info: Driver file: pdftex.def on input line 225.
(/usr/share/texlive/texmf-dist/tex/latex/graphics-def/pdftex.def
File: pdftex.def 2017/01/12 v0.06k Graphics/color for pdfTeX
(/usr/share/texlive/texmf-dist/tex/generic/oberdiek/infwarerr.sty
Package: infwarerr 2016/05/16 v1.4 Providing info/warning/error messages (HO)
)
(/usr/share/texlive/texmf-dist/tex/generic/oberdiek/ltxcmds.sty
Package: ltxcmds 2016/05/16 v1.23 LaTeX kernel commands for general use (HO)
)
\Gread@gobject=\count87
)
Package xcolor Info: Model `cmy' substituted by `cmy0' on input line 1348.
Package xcolor Info: Model `hsb' substituted by `rgb' on input line 1352.
Package xcolor Info: Model `RGB' extended on input line 1364.
Package xcolor Info: Model `HTML' substituted by `rgb' on input line 1366.
Package xcolor Info: Model `Hsb' substituted by `hsb' on input line 1367.
Package xcolor Info: Model `tHsb' substituted by `hsb' on input line 1368.
Package xcolor Info: Model `HSB' substituted by `hsb' on input line 1369.
Package xcolor Info: Model `Gray' substituted by `gray' on input line 1370.
Package xcolor Info: Model `wave' substituted by `hsb' on input line 1371.
)
(/usr/share/texlive/texmf-dist/tex/latex/geometry/geometry.sty
Package: geometry 2010/09/12 v5.6 Page Geometry
(/usr/share/texlive/texmf-dist/tex/latex/graphics/keyval.sty
Package: keyval 2014/10/28 v1.15 key=value parser (DPC)
\KV@toks@=\toks14
)
(/usr/share/texlive/texmf-dist/tex/generic/oberdiek/ifpdf.sty
Package: ifpdf 2016/05/14 v3.1 Provides the ifpdf switch
)
(/usr/share/texlive/texmf-dist/tex/generic/oberdiek/ifvtex.sty
Package: ifvtex 2016/05/16 v1.6 Detect VTeX and its facilities (HO)
Package ifvtex Info: VTeX not detected.
)
(/usr/share/texlive/texmf-dist/tex/generic/ifxetex/ifxetex.sty
Package: ifxetex 2010/09/12 v0.6 Provides ifxetex conditional
)
\Gm@cnth=\count88
\Gm@cntv=\count89
\c@Gm@tempcnt=\count90
\Gm@bindingoffset=\dimen103
\Gm@wd@mp=\dimen104
\Gm@odd@mp=\dimen105
\Gm@even@mp=\dimen106
\Gm@layoutwidth=\dimen107
\Gm@layoutheight=\dimen108
\Gm@layouthoffset=\dimen109
\Gm@layoutvoffset=\dimen110
\Gm@dimlist=\toks15
) (./7.aux)
\openout1 = `7.aux'.
LaTeX Font Info: Checking defaults for OML/cmm/m/it on input line 9.
LaTeX Font Info: ... okay on input line 9.
LaTeX Font Info: Checking defaults for T1/cmr/m/n on input line 9.
LaTeX Font Info: ... okay on input line 9.
LaTeX Font Info: Checking defaults for OT1/cmr/m/n on input line 9.
LaTeX Font Info: ... okay on input line 9.
LaTeX Font Info: Checking defaults for OMS/cmsy/m/n on input line 9.
LaTeX Font Info: ... okay on input line 9.
LaTeX Font Info: Checking defaults for OMX/cmex/m/n on input line 9.
LaTeX Font Info: ... okay on input line 9.
LaTeX Font Info: Checking defaults for U/cmr/m/n on input line 9.
LaTeX Font Info: ... okay on input line 9.
(/usr/share/texlive/texmf-dist/tex/context/base/mkii/supp-pdf.mkii
[Loading MPS to PDF converter (version 2006.09.02).]
\scratchcounter=\count91
\scratchdimen=\dimen111
\scratchbox=\box26
\nofMPsegments=\count92
\nofMParguments=\count93
\everyMPshowfont=\toks16
\MPscratchCnt=\count94
\MPscratchDim=\dimen112
\MPnumerator=\count95
\makeMPintoPDFobject=\count96
\everyMPtoPDFconversion=\toks17
)
*geometry* detected driver: dvips
*geometry* verbose mode - [ preamble ] result:
* driver: dvips
* paper: custom
* layout: <same size as paper>
* layoutoffset:(h,v)=(0.0pt,0.0pt)
* vratio: 1:1
* modes:
* h-part:(L,W,R)=(54.2025pt, 325.215pt, 54.2025pt)
* v-part:(T,H,B)=(79.49689pt, 491.43622pt, 79.49689pt)
* \paperwidth=433.62pt
* \paperheight=650.43pt
* \textwidth=325.215pt
* \textheight=491.43622pt
* \oddsidemargin=-18.06749pt
* \evensidemargin=-18.06749pt
* \topmargin=-29.7731pt
* \headheight=12.0pt
* \headsep=25.0pt
* \topskip=11.0pt
* \footskip=30.0pt
* \marginparwidth=59.0pt
* \marginparsep=10.0pt
* \columnsep=10.0pt
* \skip\footins=10.0pt plus 4.0pt minus 2.0pt
* \hoffset=0.0pt
* \voffset=0.0pt
* \mag=1000
* \@twocolumnfalse
* \@twosidefalse
* \@mparswitchfalse
* \@reversemarginfalse
* (1in=72.27pt=25.4mm, 1cm=28.453pt)
LaTeX Font Info: External font `cmex10' loaded for size
(Font) <12> on input line 11.
LaTeX Font Info: External font `cmex10' loaded for size
(Font) <8> on input line 11.
LaTeX Font Info: External font `cmex10' loaded for size
(Font) <6> on input line 11.
(./7.toc
LaTeX Font Info: External font `cmex10' loaded for size
(Font) <10.95> on input line 3.
)
\tf@toc=\write3
\openout3 = `7.toc'.
[1
Non-PDF special ignored!
{/var/lib/texmf/fonts/map/pdftex/updmap/pdftex.map}]
LaTeX Font Info: External font `cmex10' loaded for size
(Font) <9> on input line 30.
LaTeX Font Info: External font `cmex10' loaded for size
(Font) <5> on input line 30.
Underfull \hbox (badness 10000) in paragraph at lines 21--36
[]
Underfull \hbox (badness 10000) in paragraph at lines 21--36
[]
Underfull \hbox (badness 10000) in paragraph at lines 21--36
[]
Underfull \hbox (badness 10000) in paragraph at lines 21--36
[]
Underfull \hbox (badness 10000) in paragraph at lines 21--36
[]
Underfull \hbox (badness 10000) in paragraph at lines 21--36
[]
[2]
LaTeX Font Info: Try loading font information for OMS+cmr on input line 41.
(/usr/share/texlive/texmf-dist/tex/latex/base/omscmr.fd
File: omscmr.fd 2014/09/29 v2.5h Standard LaTeX font definitions
)
LaTeX Font Info: Font shape `OMS/cmr/m/n' in size <10.95> not available
(Font) Font shape `OMS/cmsy/m/n' tried instead on input line 41.
[3] [4] [5]
Overfull \hbox (135.30914pt too wide) in paragraph at lines 99--100
[]\OT1/cmr/m/n/10.95 This means you want a vol-ume some-thing like ./con-tain-e
rA[]files/logs:/var/www/log/apache2/
[]
Overfull \hbox (12.98534pt too wide) in paragraph at lines 109--110
[]\OT1/cmr/m/n/10.95 web.archive.org/web/https://github.com/moby/moby/issues/43
61,
[]
[6] (./7.aux) )
Here is how much of TeX's memory you used:
1966 strings out of 494945
25858 string characters out of 6181032
91869 words of memory out of 5000000
5283 multiletter control sequences out of 15000+600000
10198 words of font info for 36 fonts, out of 8000000 for 9000
14 hyphenation exceptions out of 8191
23i,8n,35p,690b,189s stack positions out of 5000i,500n,10000p,200000b,80000s
</usr/share/texlive/texmf-dist/fonts/type1/public/amsfonts/cm/cm
bx10.pfb></usr/share/texlive/texmf-dist/fonts/type1/public/amsfonts/cm/cmbx12.p
fb></usr/share/texlive/texmf-dist/fonts/type1/public/amsfonts/cm/cmr10.pfb></us
r/share/texlive/texmf-dist/fonts/type1/public/amsfonts/cm/cmr12.pfb></usr/share
/texlive/texmf-dist/fonts/type1/public/amsfonts/cm/cmr6.pfb></usr/share/texlive
/texmf-dist/fonts/type1/public/amsfonts/cm/cmr8.pfb></usr/share/texlive/texmf-d
ist/fonts/type1/public/amsfonts/cm/cmr9.pfb></usr/share/texlive/texmf-dist/font
s/type1/public/amsfonts/cm/cmsy10.pfb></usr/share/texlive/texmf-dist/fonts/type
1/public/amsfonts/cm/cmtt10.pfb>
Output written on 7.pdf (6 pages, 126683 bytes).
PDF statistics:
59 PDF objects out of 1000 (max. 8388607)
41 compressed objects within 1 object stream
0 named destinations out of 1000 (max. 500000)
1 words of extra memory for PDF output out of 10000 (max. 10000000)

BIN
2019/Docker_Primer/docs/7.pdf View File


+ 113
- 0
2019/Docker_Primer/docs/7.tex View File

@ -0,0 +1,113 @@
\documentclass[11pt]{article}
%Gummi|065|=)
\usepackage{xcolor}
\usepackage[vcentering,dvips]{geometry}
\geometry{papersize={6in,9in},total={4.5in,6.8in}}
\title{\textbf{Docker Primer}}
\author{Steak Electronics}
\date{08/30/19}
\begin{document}
\maketitle
\tableofcontents
\textcolor{green!60!blue!70}{
\section{Overview}}
Docker is a program in the tradition of Virtualization. However, Docker differs from a Virtual Machine, in that it uses less resources, and allows for more containers (essentially isolated OS') to run. With Docker I can run 8 different websites on a Core 2 Duo. Docker makes it trivial to transport these websites to a new machine. It's as simple as copying the docker-compose (you should be using docker compose) yml configuration, and keeping all permenant volumes, and saved files in one folder. Docker is a little more setup upfront, but promises savings in time plus interest down the line.
\textcolor{green!60!blue!70}{
\section{General Notes}}
It always helps to read a book on a subject, and then keep it as a Reference. I have read ``Using Docker'' By Adrian Mouat. It is a decent book. Not bad.
Here are some general tips:
\\
\\
First off, Docker is 64 bit only for i386 architecture. ARM has a separate build. There is no 32 bit, unfortunately.
\\
\\
You will want 'some' RAM. I had 1GB on a P4 machine, and that was not enough. 4GB was enough.
\\
\\
You should always use docker compose. If you read the book above, you will understand why. Docker can run on the command line (commands are somewhat complex for each container), but with a compose file, you can write everything down in a much simpler fashion. Use compose. It's a separate install, currently. Install it.\footnote{Seriously, just ignore the (non-docker compose) docker command lines. I consider them useless. More of a red herring for rookies.}
\\
\\
One of the benefits of docker, is its simplicity. There are essentially two commands you will ever need to know to use docker. Both must be run as root. One is \#docker (e.g. docker restart container\_name\_here). The other is docker-compose (e.g. \#docker-compose up -d).
\\
\\
\textcolor{green!60!blue!70}{
\subsection{Docker Commands Reference}}
Here is just the good stuff.
\begin{itemize}
\item docker-compose up -d (starts the containers in the docker compose file, if they aren't already started. the -d detaches from the stdout logging. You don't need to use stdout logging, you can use docker logs, but its there if you want it)
\item docker ps (lists containers running. If one fails to start, you'll see it missing from here)
\item docker logs <containername> (gives you some logging output from the container. Often enough to troubleshoot.)
\item docker exec -it <containername> /bin/bash (this will get you in a shell in the docker container. From here you can do what you need to. Most are debian, and need apt-get install less nano or whatever program you are missing. Ping is missing from possibly all containers, so if you want to test via ping, you'll have to apt-get it).
\item docker-compose restart (this will restart all containers. However, I don't recommend it. Initting containers can get corrupted this way, and also its much easier to restart a single faulty container via...)
\item docker restart <containername> (this will restart one single container.)
\item docker cp <containername>:/dir/to/file dest (you can copy files from local machine to docker, or vice versa with this. Extremely useful).
\end{itemize}
Less often, you might want to know docker kill <containername> and docker rmi -f <imagename>. The first will stop a container, the second will remove an image. If you corrupt the install of a container, the second will save you. The force switch (-f) is required. Alternatively, you can just install a container of the same type with a new container name. \footnote{This is a good way to test that your containers are built in a reproducible way. If you are able to rebuild them by deleting everything, then you likely won't have trouble down the road.}
\textcolor{green!60!blue!70}{
\section{Specific Tips}}
\textcolor{green!60!blue!70}{
\subsection{YAML is space sensitive}}
When you edit the .yml file for docker-compose, you have to hit spaces in a certain pattern (tabs not allowed). This is absurd, but just be aware. The errors are cryptic, and its often just because the spacing doesn't stick to what it expects.
\textcolor{green!60!blue!70}{
\subsection{If you restart a containers namesake process, it will probably restart / reset the container}}
So if you are troubleshooting an apache container, you edit some files, then /etc/init.d/apache2 restart, uh oh... You just undid all the edits you made, if they aren't in a permanent volume. You can shell in, make edits, and then exit the shell, but a service restart often resets the container.
\textcolor{green!60!blue!70}{
\subsection{Use a single reverse proxy, to handle multiple websites}}
There are many ways to do this. I use an nginx proxy from scratch. You can also use some containers that are built for this purpose (I personally think it's bloated but a lot of people use Jason Wilder's proxy)
\footnote{https://github.com/jwilder/nginx-proxy - A lot of people swear by this, but I think it's straying too far from the motorcycle.}
\textcolor{green!60!blue!70}{
\subsection{If you use a single reverse proxy, Lets Encrypt can be done easy}}
In this case scenario you would have certbot on the host and a local volume that the proxy has access to which is the webroot of the Lets Encrypt scripts. The nginx proxy entry look something like this:
\begin{verbatim}
location ^~ /.well-known {
alias /var/www/html/.well-known/;
autoindex on;
}
\end{verbatim}
And this is put in every server declaration of nginx.conf. Real simple, real easy. The docker compose of the nginx proxy is something like:
\begin{verbatim}
nginx:
image: nginx:latest
container_name: custom_name_for_my_proxy
volumes:
- ./nginx.conf:/etc/nginx/nginx.conf
- /etc/letsencrypt/:/etc/letsencrypt/
- ./webroot/:/var/www/html/
\end{verbatim}
The volumes section is extremely simple, don't be scared. There are two entries. Local and remote. You specify what folder will be the local directory which will be cloned to the host at the remote path you specify. So, the host runs certbot at /etc/letsencrypt, and this folder is cloned to the nginx proxy container, at the same location. Finally, webroot must be set in certbot, but it prompts you for this\footnote{And if you forget or get it wrong, it can be configured somewhere in /etc/letsencrypt. it's a one liner text entry).}
\textcolor{green!60!blue!70}{
\subsection{Give every Container a Containername}}
This makes it easier to refer to them later. All you need to do in the compose file is include container\_name: something. Much better than the gibberish they give these names if you don't include it.
\textcolor{green!60!blue!70}{
\subsection{Beware of Interrupting Initting Containers}}
When you first build a container, it might take 30-60 or more seconds to do whatever it needs to do. If, before then, you restart it... It may get corrupted. This has happened to me more than once. When you are testing a new container, and it doesn't seem to work for some inexplicable reason, create a container with a new name (it will create a new one), or delete the first one, and start it again.
\textcolor{green!60!blue!70}{
\subsection{Put Apache or Program logs from the Container in a volume that is locally accessible}}
This means you want a volume something like ./containerA\_files/logs:/var/www/log/apache2/ so that you can monitor the logs from your host machine easily. docker logs doesn't have everything.
\textcolor{green!60!blue!70}{
\subsection{Only Restart Containers you need to Restart}}
You can restart everything with docker-compose restart, but it's faster, and less prone to break initting containers, if you docker restart containername. Do the latter.
\textcolor{green!60!blue!70}{
\subsection{Volumes Mounting Over Existing Directories}}
As discussed here:
web.archive.org/web/https://github.com/moby/moby/issues/4361, if you add a volume to an existing container, it will seem to delete the folder's contents. I've seen mixed behaviour with this. Sometimes it deletes it even if you start a new container with the folder... Other times it has not. In any case, just docker cp the files to the folder, then add the volume mount.
\end{document}

+ 111
- 0
2019/Docker_Primer/docs/7.tex~ View File

@ -0,0 +1,111 @@
\documentclass[11pt]{article}
%Gummi|065|=)
\usepackage{xcolor}
\usepackage[vcentering,dvips]{geometry}
\geometry{papersize={6in,9in},total={4.5in,6.8in}}
\title{\textbf{Docker Primer}}
\author{Steak Electronics}
\date{08/30/19}
\begin{document}
\maketitle
\tableofcontents
\textcolor{green!60!blue!70}{
\section{Overview}}
Docker is a program in the tradition of Virtualization. However, Docker differs from a Virtual Machine, in that it uses less resources, and allows for more containers (essentially isolated OS') to run. With Docker I can run 8 different websites on a Core 2 Duo. Docker makes it trivial to transport these websites to a new machine. It's as simple as copying the docker-compose (you should be using docker compose) yml configuration, and keeping all permenant volumes, and saved files in one folder. Docker is a little more setup upfront, but promises savings in time plus interest down the line.
\textcolor{green!60!blue!70}{
\section{General Notes}}
It always helps to read a book on a subject, and then keep it as a Reference. I have read ``Using Docker'' By Adrian Mouat. It is a decent book. Not bad.
Here are some general tips:
\\
\\
First off, Docker is 64 bit only for i386 architecture. ARM has a separate build. There is no 32 bit, unfortunately.
\\
\\
You will want 'some' RAM. I had 1GB on a P4 machine, and that was not enough. 4GB was enough.
\\
\\
You should always use docker compose. If you read the book above, you will understand why. Docker can run on the command line (commands are somewhat complex for each container), but with a compose file, you can write everything down in a much simpler fashion. Use compose. It's a separate install, currently. Install it.\footnote{Seriously, just ignore the (non-docker compose) docker command lines. I consider them useless. More of a red herring for rookies.}
\\
\\
One of the benefits of docker, is its simplicity. There are essentially two commands you will ever need to know to use docker. Both must be run as root. One is \#docker (e.g. docker restart container\_name\_here). The other is docker-compose (e.g. \#docker-compose up -d).
\\
\\
\textcolor{green!60!blue!70}{
\subsection{Docker Commands Reference}}
Here is just the good stuff.
\begin{itemize}
\item docker-compose up -d (starts the containers in the docker compose file, if they aren't already started. the -d detaches from the stdout logging. You don't need to use stdout logging, you can use docker logs, but its there if you want it)
\item docker ps (lists containers running. If one fails to start, you'll see it missing from here)
\item docker logs <containername> (gives you some logging output from the container. Often enough to troubleshoot.)
\item docker exec -it <containername> /bin/bash (this will get you in a shell in the docker container. From here you can do what you need to. Most are debian, and need apt-get install less nano or whatever program you are missing. Ping is missing from possibly all containers, so if you want to test via ping, you'll have to apt-get it).
\item docker-compose restart (this will restart all containers. However, I don't recommend it. Initting containers can get corrupted this way, and also its much easier to restart a single faulty container via...)
\item docker restart <containername> (this will restart one single container.)
\item docker cp <containername>:/dir/to/file dest (you can copy files from local machine to docker, or vice versa with this. Extremely useful).
\end{itemize}
Less often, you might want to know docker kill <containername> and docker rmi -f <imagename>. The first will stop a container, the second will remove an image. If you corrupt the install of a container, the second will save you. The force switch (-f) is required. Alternatively, you can just install a container of the same type with a new container name. \footnote{This is a good way to test that your containers are built in a reproducible way. If you are able to rebuild them by deleting everything, then you likely won't have trouble down the road.}
\textcolor{green!60!blue!70}{
\section{Specific Tips}}
\textcolor{green!60!blue!70}{
\subsection{YAML is space sensitive}}
When you edit the .yml file for docker-compose, you have to hit spaces in a certain pattern (tabs not allowed). This is absurd, but just be aware. The errors are cryptic, and its often just because the spacing doesn't stick to what it expects.
\textcolor{green!60!blue!70}{
\subsection{If you restart a containers namesake process, it will probably restart / reset the container}}
So if you are troubleshooting an apache container, you edit some files, then /etc/init.d/apache2 restart, uh oh... You just undid all the edits you made, if they aren't in a permanent volume. You can shell in, make edits, and then exit the shell, but a service restart often resets the container.
\textcolor{green!60!blue!70}{
\subsection{Use a single reverse proxy, to handle multiple websites}}
There are many ways to do this. I use an nginx proxy from scratch. You can also use some containers that are built for this purpose (I personally think it's bloated but a lot of people use Jason Wilder's proxy)
\footnote{https://github.com/jwilder/nginx-proxy - A lot of people swear by this, but I think it's straying too far from the motorcycle.}
\textcolor{green!60!blue!70}{
\subsection{If you use a single reverse proxy, Lets Encrypt can be done easy}}
In this case scenario you would have certbot on the host and a local volume that the proxy has access to which is the webroot of the Lets Encrypt scripts. The nginx proxy entry look something like this:
\begin{verbatim}
location ^~ /.well-known {
alias /var/www/html/.well-known/;
autoindex on;
}
\end{verbatim}
And this is put in every server declaration of nginx.conf. Real simple, real easy. The docker compose of the nginx proxy is something like:
\begin{verbatim}
nginx:
image: nginx:latest
container_name: custom_name_for_my_proxy
volumes:
- ./nginx.conf:/etc/nginx/nginx.conf
- /etc/letsencrypt/:/etc/letsencrypt/
- ./webroot/:/var/www/html/
\end{verbatim}
The volumes section is extremely simple, don't be scared. There are two entries. Local and remote. You specify what folder will be the local directory which will be cloned to the host at the remote path you specify. So, the host runs certbot at /etc/letsencrypt, and this folder is cloned to the nginx proxy container, at the same location. Finally, webroot must be set in certbot, but it prompts you for this\footnote{And if you forget or get it wrong, it can be configured somewhere in /etc/letsencrypt. it's a one liner text entry).}
\textcolor{green!60!blue!70}{
\subsection{Give every Container a Containername}}
This makes it easier to refer to them later. All you need to do in the compose file is include container\_name: something. Much better than the gibberish they give these names if you don't include it.
\textcolor{green!60!blue!70}{
\subsection{Beware of Interrupting Initting Containers}}
When you first build a container, it might take 30-60 or more seconds to do whatever it needs to do. If, before then, you restart it... It may get corrupted. This has happened to me more than once. When you are testing a new container, and it doesn't seem to work for some inexplicable reason, create a container with a new name (it will create a new one), or delete the first one, and start it again.
\textcolor{green!60!blue!70}{
\subsection{Put Apache or Program logs from the Container in a volume that is locally accessible}}
This means you want a volume something like ./containerA\_files/logs:/var/www/log/apache2/ so that you can monitor the logs from your host machine easily. docker logs doesn't have everything.
\textcolor{green!60!blue!70}{
\subsection{Only Restart Containers you need to Restart}}
You can restart everything with docker-compose restart, but it's faster, and less prone to break initting containers, if you docker restart containername. Do the latter.
\textcolor{green!60!blue!70}{
\subsection{Volumes Mounting Over Existing Directories}}
As discussed here: web.archive.org/web/https://github.com/moby/moby/issues/4361, if you add a volume to an existing container, it will seem to delete the folder's contents. I've seen mixed behaviour with this. Sometimes it deletes it even if you start a new container with the folder... Other times it has not. In any case, just docker cp the files to the folder, then add the volume mount.
\end{document}

+ 13
- 0
2019/Docker_Primer/docs/7.toc View File

@ -0,0 +1,13 @@
\contentsline {section}{\numberline {1}Overview}{1}
\contentsline {section}{\numberline {2}General Notes}{2}
\contentsline {subsection}{\numberline {2.1}Docker Commands Reference}{3}
\contentsline {section}{\numberline {3}Specific Tips}{4}
\contentsline {subsection}{\numberline {3.1}YAML is space sensitive}{4}
\contentsline {subsection}{\numberline {3.2}If you restart a containers namesake process, it will probably restart / reset the container}{4}
\contentsline {subsection}{\numberline {3.3}Use a single reverse proxy, to handle multiple websites}{4}
\contentsline {subsection}{\numberline {3.4}If you use a single reverse proxy, Lets Encrypt can be done easy}{5}
\contentsline {subsection}{\numberline {3.5}Give every Container a Containername}{5}
\contentsline {subsection}{\numberline {3.6}Beware of Interrupting Initting Containers}{6}
\contentsline {subsection}{\numberline {3.7}Put Apache or Program logs from the Container in a volume that is locally accessible}{6}
\contentsline {subsection}{\numberline {3.8}Only Restart Containers you need to Restart}{6}
\contentsline {subsection}{\numberline {3.9}Volumes Mounting Over Existing Directories}{6}

+ 15
- 0
2019/Docker_Primer/docs/8.aux View File

@ -0,0 +1,15 @@
\relax
\@writefile{toc}{\contentsline {section}{\numberline {1}Overview}{1}}
\@writefile{toc}{\contentsline {section}{\numberline {2}General Notes}{2}}
\@writefile{toc}{\contentsline {subsection}{\numberline {2.1}Docker Commands Reference}{3}}
\@writefile{toc}{\contentsline {section}{\numberline {3}Specific Tips}{4}}
\@writefile{toc}{\contentsline {subsection}{\numberline {3.1}YAML is space sensitive}{4}}
\@writefile{toc}{\contentsline {subsection}{\numberline {3.2}If you restart a containers namesake process, it will probably restart / reset the container}{4}}
\@writefile{toc}{\contentsline {subsection}{\numberline {3.3}Use a single reverse proxy, to handle multiple websites}{4}}
\@writefile{toc}{\contentsline {subsection}{\numberline {3.4}If you use a single reverse proxy, Lets Encrypt can be done easy}{5}}
\@writefile{toc}{\contentsline {subsection}{\numberline {3.5}Give every Container a Containername}{5}}
\@writefile{toc}{\contentsline {subsection}{\numberline {3.6}Beware of Interrupting Initting Containers}{6}}
\@writefile{toc}{\contentsline {subsection}{\numberline {3.7}Put Apache or Program logs from the Container in a volume that is locally accessible}{6}}
\@writefile{toc}{\contentsline {subsection}{\numberline {3.8}Only Restart Containers you need to Restart}{6}}
\@writefile{toc}{\contentsline {subsection}{\numberline {3.9}Volumes Mounting Over Existing Directories}{6}}
\@writefile{toc}{\contentsline {subsection}{\numberline {3.10}Further Reading}{6}}

+ 245
- 0
2019/Docker_Primer/docs/8.log View File

@ -0,0 +1,245 @@
This is pdfTeX, Version 3.14159265-2.6-1.40.17 (TeX Live 2016/Debian) (preloaded format=pdflatex 2019.8.17) 15 DEC 2019 20:17
entering extended mode
restricted \write18 enabled.
%&-line parsing enabled.
**/home/layoutdev/Desktop/code/documentation_general/IT_Articles/2019/Docker_Pr
imer/docs/8.tex
(/home/layoutdev/Desktop/code/documentation_general/IT_Articles/2019/Docker_Pri
mer/docs/8.tex
LaTeX2e <2017/01/01> patch level 3
Babel <3.9r> and hyphenation patterns for 3 language(s) loaded.
(/usr/share/texlive/texmf-dist/tex/latex/base/article.cls
Document Class: article 2014/09/29 v1.4h Standard LaTeX document class
(/usr/share/texlive/texmf-dist/tex/latex/base/size11.clo
File: size11.clo 2014/09/29 v1.4h Standard LaTeX file (size option)
)
\c@part=\count79
\c@section=\count80
\c@subsection=\count81
\c@subsubsection=\count82
\c@paragraph=\count83
\c@subparagraph=\count84
\c@figure=\count85
\c@table=\count86
\abovecaptionskip=\skip41
\belowcaptionskip=\skip42
\bibindent=\dimen102
)
(/usr/share/texlive/texmf-dist/tex/latex/xcolor/xcolor.sty
Package: xcolor 2016/05/11 v2.12 LaTeX color extensions (UK)
(/usr/share/texlive/texmf-dist/tex/latex/graphics-cfg/color.cfg
File: color.cfg 2016/01/02 v1.6 sample color configuration
)
Package xcolor Info: Driver file: pdftex.def on input line 225.
(/usr/share/texlive/texmf-dist/tex/latex/graphics-def/pdftex.def
File: pdftex.def 2017/01/12 v0.06k Graphics/color for pdfTeX
(/usr/share/texlive/texmf-dist/tex/generic/oberdiek/infwarerr.sty
Package: infwarerr 2016/05/16 v1.4 Providing info/warning/error messages (HO)
)
(/usr/share/texlive/texmf-dist/tex/generic/oberdiek/ltxcmds.sty
Package: ltxcmds 2016/05/16 v1.23 LaTeX kernel commands for general use (HO)
)
\Gread@gobject=\count87
)
Package xcolor Info: Model `cmy' substituted by `cmy0' on input line 1348.
Package xcolor Info: Model `hsb' substituted by `rgb' on input line 1352.
Package xcolor Info: Model `RGB' extended on input line 1364.
Package xcolor Info: Model `HTML' substituted by `rgb' on input line 1366.
Package xcolor Info: Model `Hsb' substituted by `hsb' on input line 1367.
Package xcolor Info: Model `tHsb' substituted by `hsb' on input line 1368.
Package xcolor Info: Model `HSB' substituted by `hsb' on input line 1369.
Package xcolor Info: Model `Gray' substituted by `gray' on input line 1370.
Package xcolor Info: Model `wave' substituted by `hsb' on input line 1371.
)
(/usr/share/texlive/texmf-dist/tex/latex/geometry/geometry.sty
Package: geometry 2010/09/12 v5.6 Page Geometry
(/usr/share/texlive/texmf-dist/tex/latex/graphics/keyval.sty
Package: keyval 2014/10/28 v1.15 key=value parser (DPC)
\KV@toks@=\toks14
)
(/usr/share/texlive/texmf-dist/tex/generic/oberdiek/ifpdf.sty
Package: ifpdf 2016/05/14 v3.1 Provides the ifpdf switch
)
(/usr/share/texlive/texmf-dist/tex/generic/oberdiek/ifvtex.sty
Package: ifvtex 2016/05/16 v1.6 Detect VTeX and its facilities (HO)
Package ifvtex Info: VTeX not detected.
)
(/usr/share/texlive/texmf-dist/tex/generic/ifxetex/ifxetex.sty
Package: ifxetex 2010/09/12 v0.6 Provides ifxetex conditional
)
\Gm@cnth=\count88
\Gm@cntv=\count89
\c@Gm@tempcnt=\count90
\Gm@bindingoffset=\dimen103
\Gm@wd@mp=\dimen104
\Gm@odd@mp=\dimen105
\Gm@even@mp=\dimen106
\Gm@layoutwidth=\dimen107
\Gm@layoutheight=\dimen108
\Gm@layouthoffset=\dimen109
\Gm@layoutvoffset=\dimen110
\Gm@dimlist=\toks15
) (./8.aux)
\openout1 = `8.aux'.
LaTeX Font Info: Checking defaults for OML/cmm/m/it on input line 9.
LaTeX Font Info: ... okay on input line 9.
LaTeX Font Info: Checking defaults for T1/cmr/m/n on input line 9.
LaTeX Font Info: ... okay on input line 9.
LaTeX Font Info: Checking defaults for OT1/cmr/m/n on input line 9.
LaTeX Font Info: ... okay on input line 9.
LaTeX Font Info: Checking defaults for OMS/cmsy/m/n on input line 9.
LaTeX Font Info: ... okay on input line 9.
LaTeX Font Info: Checking defaults for OMX/cmex/m/n on input line 9.
LaTeX Font Info: ... okay on input line 9.
LaTeX Font Info: Checking defaults for U/cmr/m/n on input line 9.
LaTeX Font Info: ... okay on input line 9.
(/usr/share/texlive/texmf-dist/tex/context/base/mkii/supp-pdf.mkii
[Loading MPS to PDF converter (version 2006.09.02).]
\scratchcounter=\count91
\scratchdimen=\dimen111
\scratchbox=\box26
\nofMPsegments=\count92
\nofMParguments=\count93
\everyMPshowfont=\toks16
\MPscratchCnt=\count94
\MPscratchDim=\dimen112
\MPnumerator=\count95
\makeMPintoPDFobject=\count96
\everyMPtoPDFconversion=\toks17
)
*geometry* detected driver: dvips
*geometry* verbose mode - [ preamble ] result:
* driver: dvips
* paper: custom
* layout: <same size as paper>
* layoutoffset:(h,v)=(0.0pt,0.0pt)
* vratio: 1:1
* modes:
* h-part:(L,W,R)=(54.2025pt, 325.215pt, 54.2025pt)
* v-part:(T,H,B)=(79.49689pt, 491.43622pt, 79.49689pt)
* \paperwidth=433.62pt
* \paperheight=650.43pt
* \textwidth=325.215pt
* \textheight=491.43622pt
* \oddsidemargin=-18.06749pt
* \evensidemargin=-18.06749pt
* \topmargin=-29.7731pt
* \headheight=12.0pt
* \headsep=25.0pt
* \topskip=11.0pt
* \footskip=30.0pt
* \marginparwidth=59.0pt
* \marginparsep=10.0pt
* \columnsep=10.0pt
* \skip\footins=10.0pt plus 4.0pt minus 2.0pt
* \hoffset=0.0pt
* \voffset=0.0pt
* \mag=1000
* \@twocolumnfalse
* \@twosidefalse
* \@mparswitchfalse
* \@reversemarginfalse
* (1in=72.27pt=25.4mm, 1cm=28.453pt)
LaTeX Font Info: External font `cmex10' loaded for size
(Font) <12> on input line 11.
LaTeX Font Info: External font `cmex10' loaded for size
(Font) <8> on input line 11.
LaTeX Font Info: External font `cmex10' loaded for size
(Font) <6> on input line 11.
(./8.toc
LaTeX Font Info: External font `cmex10' loaded for size
(Font) <10.95> on input line 3.
)
\tf@toc=\write3
\openout3 = `8.toc'.
[1
Non-PDF special ignored!
{/var/lib/texmf/fonts/map/pdftex/updmap/pdftex.map}]
LaTeX Font Info: External font `cmex10' loaded for size
(Font) <9> on input line 30.
LaTeX Font Info: External font `cmex10' loaded for size
(Font) <5> on input line 30.
Underfull \hbox (badness 10000) in paragraph at lines 21--36
[]
Underfull \hbox (badness 10000) in paragraph at lines 21--36
[]
Underfull \hbox (badness 10000) in paragraph at lines 21--36
[]
Underfull \hbox (badness 10000) in paragraph at lines 21--36
[]
Underfull \hbox (badness 10000) in paragraph at lines 21--36
[]
Underfull \hbox (badness 10000) in paragraph at lines 21--36
[]
[2]
LaTeX Font Info: Try loading font information for OMS+cmr on input line 41.
(/usr/share/texlive/texmf-dist/tex/latex/base/omscmr.fd
File: omscmr.fd 2014/09/29 v2.5h Standard LaTeX font definitions
)
LaTeX Font Info: Font shape `OMS/cmr/m/n' in size <10.95> not available
(Font) Font shape `OMS/cmsy/m/n' tried instead on input line 41.
[3] [4] [5]
Overfull \hbox (135.30914pt too wide) in paragraph at lines 99--100
[]\OT1/cmr/m/n/10.95 This means you want a vol-ume some-thing like ./con-tain-e
rA[]files/logs:/var/www/log/apache2/
[]
Overfull \hbox (12.98534pt too wide) in paragraph at lines 109--110
[]\OT1/cmr/m/n/10.95 web.archive.org/web/https://github.com/moby/moby/issues/43
61,
[]
[6] [7] (./8.aux) )
Here is how much of TeX's memory you used:
1966 strings out of 494945
25858 string characters out of 6181032
91869 words of memory out of 5000000
5283 multiletter control sequences out of 15000+600000
10198 words of font info for 36 fonts, out of 8000000 for 9000
14 hyphenation exceptions out of 8191
23i,8n,35p,690b,200s stack positions out of 5000i,500n,10000p,200000b,80000s
</usr/share/texlive/texmf-dist/fonts/type1/public/amsfonts/c
m/cmbx10.pfb></usr/share/texlive/texmf-dist/fonts/type1/public/amsfonts/cm/cmbx
12.pfb></usr/share/texlive/texmf-dist/fonts/type1/public/amsfonts/cm/cmr10.pfb>
</usr/share/texlive/texmf-dist/fonts/type1/public/amsfonts/cm/cmr12.pfb></usr/s
hare/texlive/texmf-dist/fonts/type1/public/amsfonts/cm/cmr6.pfb></usr/share/tex
live/texmf-dist/fonts/type1/public/amsfonts/cm/cmr8.pfb></usr/share/texlive/tex
mf-dist/fonts/type1/public/amsfonts/cm/cmr9.pfb></usr/share/texlive/texmf-dist/
fonts/type1/public/amsfonts/cm/cmsy10.pfb></usr/share/texlive/texmf-dist/fonts/
type1/public/amsfonts/cm/cmtt10.pfb>
Output written on 8.pdf (7 pages, 127323 bytes).
PDF statistics:
64 PDF objects out of 1000 (max. 8388607)
45 compressed objects within 1 object stream
0 named destinations out of 1000 (max. 500000)
1 words of extra memory for PDF output out of 10000 (max. 10000000)

BIN
2019/Docker_Primer/docs/8.pdf View File


+ 119
- 0
2019/Docker_Primer/docs/8.tex View File

@ -0,0 +1,119 @@
\documentclass[11pt]{article}
%Gummi|065|=)
\usepackage{xcolor}
\usepackage[vcentering,dvips]{geometry}
\geometry{papersize={6in,9in},total={4.5in,6.8in}}
\title{\textbf{Docker Primer}}
\author{Steak Electronics}
\date{08/30/19}
\begin{document}
\maketitle
\tableofcontents
\textcolor{green!60!blue!70}{
\section{Overview}}
Docker is a program in the tradition of Virtualization. However, Docker differs from a Virtual Machine, in that it uses less resources, and allows for more containers (essentially isolated OS') to run. With Docker I can run 8 different websites on a Core 2 Duo. Docker makes it trivial to transport these websites to a new machine. It's as simple as copying the docker-compose (you should be using docker compose) yml configuration, and keeping all permenant volumes, and saved files in one folder. Docker is a little more setup upfront, but promises savings in time plus interest down the line.
\textcolor{green!60!blue!70}{
\section{General Notes}}
It always helps to read a book on a subject, and then keep it as a Reference. I have read ``Using Docker'' By Adrian Mouat. It is a decent book. Not bad.
Here are some general tips:
\\
\\
First off, Docker is 64 bit only for i386 architecture. ARM has a separate build. There is no 32 bit, unfortunately.
\\
\\
You will want 'some' RAM. I had 1GB on a P4 machine, and that was not enough. 4GB was enough.
\\
\\
You should always use docker compose. If you read the book above, you will understand why. Docker can run on the command line (commands are somewhat complex for each container), but with a compose file, you can write everything down in a much simpler fashion. Use compose. It's a separate install, currently. Install it.\footnote{Seriously, just ignore the (non-docker compose) docker command lines. I consider them useless. More of a red herring for rookies.}
\\
\\
One of the benefits of docker, is its simplicity. There are essentially two commands you will ever need to know to use docker. Both must be run as root. One is \#docker (e.g. docker restart container\_name\_here). The other is docker-compose (e.g. \#docker-compose up -d).
\\
\\
\textcolor{green!60!blue!70}{
\subsection{Docker Commands Reference}}
Here is just the good stuff.
\begin{itemize}
\item docker-compose up -d (starts the containers in the docker compose file, if they aren't already started. the -d detaches from the stdout logging. You don't need to use stdout logging, you can use docker logs, but its there if you want it)
\item docker ps (lists containers running. If one fails to start, you'll see it missing from here)
\item docker logs <containername> (gives you some logging output from the container. Often enough to troubleshoot.)
\item docker exec -it <containername> /bin/bash (this will get you in a shell in the docker container. From here you can do what you need to. Most are debian, and need apt-get install less nano or whatever program you are missing. Ping is missing from possibly all containers, so if you want to test via ping, you'll have to apt-get it).
\item docker-compose restart (this will restart all containers. However, I don't recommend it. Initting containers can get corrupted this way, and also its much easier to restart a single faulty container via...)
\item docker restart <containername> (this will restart one single container.)
\item docker cp <containername>:/dir/to/file dest (you can copy files from local machine to docker, or vice versa with this. Extremely useful).
\end{itemize}
Less often, you might want to know docker kill <containername> and docker rmi -f <imagename>. The first will stop a container, the second will remove an image. If you corrupt the install of a container, the second will save you. The force switch (-f) is required. Alternatively, you can just install a container of the same type with a new container name. \footnote{This is a good way to test that your containers are built in a reproducible way. If you are able to rebuild them by deleting everything, then you likely won't have trouble down the road.}
\textcolor{green!60!blue!70}{
\section{Specific Tips}}
\textcolor{green!60!blue!70}{
\subsection{YAML is space sensitive}}
When you edit the .yml file for docker-compose, you have to hit spaces in a certain pattern (tabs not allowed). This is absurd, but just be aware. The errors are cryptic, and its often just because the spacing doesn't stick to what it expects.
\textcolor{green!60!blue!70}{
\subsection{If you restart a containers namesake process, it will probably restart / reset the container}}
So if you are troubleshooting an apache container, you edit some files, then /etc/init.d/apache2 restart, uh oh... You just undid all the edits you made, if they aren't in a permanent volume. You can shell in, make edits, and then exit the shell, but a service restart often resets the container.
\textcolor{green!60!blue!70}{
\subsection{Use a single reverse proxy, to handle multiple websites}}
There are many ways to do this. I use an nginx proxy from scratch. You can also use some containers that are built for this purpose (I personally think it's bloated but a lot of people use Jason Wilder's proxy)
\footnote{https://github.com/jwilder/nginx-proxy - A lot of people swear by this, but I think it's straying too far from the motorcycle.}
\textcolor{green!60!blue!70}{
\subsection{If you use a single reverse proxy, Lets Encrypt can be done easy}}
In this case scenario you would have certbot on the host and a local volume that the proxy has access to which is the webroot of the Lets Encrypt scripts. The nginx proxy entry look something like this:
\begin{verbatim}
location ^~ /.well-known {
alias /var/www/html/.well-known/;
autoindex on;
}
\end{verbatim}
And this is put in every server declaration of nginx.conf. Real simple, real easy. The docker compose of the nginx proxy is something like:
\begin{verbatim}
nginx:
image: nginx:latest
container_name: custom_name_for_my_proxy
volumes:
- ./nginx.conf:/etc/nginx/nginx.conf
- /etc/letsencrypt/:/etc/letsencrypt/
- ./webroot/:/var/www/html/
\end{verbatim}
The volumes section is extremely simple, don't be scared. There are two entries. Local and remote. You specify what folder will be the local directory which will be cloned to the host at the remote path you specify. So, the host runs certbot at /etc/letsencrypt, and this folder is cloned to the nginx proxy container, at the same location. Finally, webroot must be set in certbot, but it prompts you for this\footnote{And if you forget or get it wrong, it can be configured somewhere in /etc/letsencrypt. it's a one liner text entry).}
\textcolor{green!60!blue!70}{
\subsection{Give every Container a Containername}}
This makes it easier to refer to them later. All you need to do in the compose file is include container\_name: something. Much better than the gibberish they give these names if you don't include it.
\textcolor{green!60!blue!70}{
\subsection{Beware of Interrupting Initting Containers}}
When you first build a container, it might take 30-60 or more seconds to do whatever it needs to do. If, before then, you restart it... It may get corrupted. This has happened to me more than once. When you are testing a new container, and it doesn't seem to work for some inexplicable reason, create a container with a new name (it will create a new one), or delete the first one, and start it again.
\textcolor{green!60!blue!70}{
\subsection{Put Apache or Program logs from the Container in a volume that is locally accessible}}
This means you want a volume something like ./containerA\_files/logs:/var/www/log/apache2/ so that you can monitor the logs from your host machine easily. docker logs doesn't have everything.
\textcolor{green!60!blue!70}{
\subsection{Only Restart Containers you need to Restart}}
You can restart everything with docker-compose restart, but it's faster, and less prone to break initting containers, if you docker restart containername. Do the latter.
\textcolor{green!60!blue!70}{
\subsection{Volumes Mounting Over Existing Directories}}
As discussed here:
web.archive.org/web/https://github.com/moby/moby/issues/4361, if you add a volume to an existing container, it will seem to delete the folder's contents. I've seen mixed behaviour with this. Sometimes it deletes it even if you start a new container with the folder... Other times it has not. In any case, just docker cp the files to the folder, then add the volume mount.
\textcolor{green!60!blue!70}{
\subsection{Further Reading}}
https://steakwiki.com/Docker
hosts my current docker notes.
\end{document}

+ 113
- 0
2019/Docker_Primer/docs/8.tex~ View File

@ -0,0 +1,113 @@
\documentclass[11pt]{article}
%Gummi|065|=)
\usepackage{xcolor}
\usepackage[vcentering,dvips]{geometry}
\geometry{papersize={6in,9in},total={4.5in,6.8in}}
\title{\textbf{Docker Primer}}
\author{Steak Electronics}
\date{08/30/19}
\begin{document}
\maketitle
\tableofcontents
\textcolor{green!60!blue!70}{
\section{Overview}}
Docker is a program in the tradition of Virtualization. However, Docker differs from a Virtual Machine, in that it uses less resources, and allows for more containers (essentially isolated OS') to run. With Docker I can run 8 different websites on a Core 2 Duo. Docker makes it trivial to transport these websites to a new machine. It's as simple as copying the docker-compose (you should be using docker compose) yml configuration, and keeping all permenant volumes, and saved files in one folder. Docker is a little more setup upfront, but promises savings in time plus interest down the line.
\textcolor{green!60!blue!70}{
\section{General Notes}}
It always helps to read a book on a subject, and then keep it as a Reference. I have read ``Using Docker'' By Adrian Mouat. It is a decent book. Not bad.
Here are some general tips:
\\
\\
First off, Docker is 64 bit only for i386 architecture. ARM has a separate build. There is no 32 bit, unfortunately.
\\
\\
You will want 'some' RAM. I had 1GB on a P4 machine, and that was not enough. 4GB was enough.
\\
\\
You should always use docker compose. If you read the book above, you will understand why. Docker can run on the command line (commands are somewhat complex for each container), but with a compose file, you can write everything down in a much simpler fashion. Use compose. It's a separate install, currently. Install it.\footnote{Seriously, just ignore the (non-docker compose) docker command lines. I consider them useless. More of a red herring for rookies.}
\\
\\
One of the benefits of docker, is its simplicity. There are essentially two commands you will ever need to know to use docker. Both must be run as root. One is \#docker (e.g. docker restart container\_name\_here). The other is docker-compose (e.g. \#docker-compose up -d).
\\
\\
\textcolor{green!60!blue!70}{
\subsection{Docker Commands Reference}}
Here is just the good stuff.
\begin{itemize}
\item docker-compose up -d (starts the containers in the docker compose file, if they aren't already started. the -d detaches from the stdout logging. You don't need to use stdout logging, you can use docker logs, but its there if you want it)
\item docker ps (lists containers running. If one fails to start, you'll see it missing from here)
\item docker logs <containername> (gives you some logging output from the container. Often enough to troubleshoot.)
\item docker exec -it <containername> /bin/bash (this will get you in a shell in the docker container. From here you can do what you need to. Most are debian, and need apt-get install less nano or whatever program you are missing. Ping is missing from possibly all containers, so if you want to test via ping, you'll have to apt-get it).
\item docker-compose restart (this will restart all containers. However, I don't recommend it. Initting containers can get corrupted this way, and also its much easier to restart a single faulty container via...)
\item docker restart <containername> (this will restart one single container.)
\item docker cp <containername>:/dir/to/file dest (you can copy files from local machine to docker, or vice versa with this. Extremely useful).
\end{itemize}
Less often, you might want to know docker kill <containername> and docker rmi -f <imagename>. The first will stop a container, the second will remove an image. If you corrupt the install of a container, the second will save you. The force switch (-f) is required. Alternatively, you can just install a container of the same type with a new container name. \footnote{This is a good way to test that your containers are built in a reproducible way. If you are able to rebuild them by deleting everything, then you likely won't have trouble down the road.}
\textcolor{green!60!blue!70}{
\section{Specific Tips}}
\textcolor{green!60!blue!70}{
\subsection{YAML is space sensitive}}
When you edit the .yml file for docker-compose, you have to hit spaces in a certain pattern (tabs not allowed). This is absurd, but just be aware. The errors are cryptic, and its often just because the spacing doesn't stick to what it expects.
\textcolor{green!60!blue!70}{
\subsection{If you restart a containers namesake process, it will probably restart / reset the container}}
So if you are troubleshooting an apache container, you edit some files, then /etc/init.d/apache2 restart, uh oh... You just undid all the edits you made, if they aren't in a permanent volume. You can shell in, make edits, and then exit the shell, but a service restart often resets the container.
\textcolor{green!60!blue!70}{
\subsection{Use a single reverse proxy, to handle multiple websites}}
There are many ways to do this. I use an nginx proxy from scratch. You can also use some containers that are built for this purpose (I personally think it's bloated but a lot of people use Jason Wilder's proxy)
\footnote{https://github.com/jwilder/nginx-proxy - A lot of people swear by this, but I think it's straying too far from the motorcycle.}
\textcolor{green!60!blue!70}{
\subsection{If you use a single reverse proxy, Lets Encrypt can be done easy}}
In this case scenario you would have certbot on the host and a local volume that the proxy has access to which is the webroot of the Lets Encrypt scripts. The nginx proxy entry look something like this:
\begin{verbatim}
location ^~ /.well-known {
alias /var/www/html/.well-known/;
autoindex on;
}
\end{verbatim}
And this is put in every server declaration of nginx.conf. Real simple, real easy. The docker compose of the nginx proxy is something like:
\begin{verbatim}
nginx:
image: nginx:latest
container_name: custom_name_for_my_proxy
volumes:
- ./nginx.conf:/etc/nginx/nginx.conf
- /etc/letsencrypt/:/etc/letsencrypt/
- ./webroot/:/var/www/html/
\end{verbatim}
The volumes section is extremely simple, don't be scared. There are two entries. Local and remote. You specify what folder will be the local directory which will be cloned to the host at the remote path you specify. So, the host runs certbot at /etc/letsencrypt, and this folder is cloned to the nginx proxy container, at the same location. Finally, webroot must be set in certbot, but it prompts you for this\footnote{And if you forget or get it wrong, it can be configured somewhere in /etc/letsencrypt. it's a one liner text entry).}
\textcolor{green!60!blue!70}{
\subsection{Give every Container a Containername}}
This makes it easier to refer to them later. All you need to do in the compose file is include container\_name: something. Much better than the gibberish they give these names if you don't include it.
\textcolor{green!60!blue!70}{
\subsection{Beware of Interrupting Initting Containers}}
When you first build a container, it might take 30-60 or more seconds to do whatever it needs to do. If, before then, you restart it... It may get corrupted. This has happened to me more than once. When you are testing a new container, and it doesn't seem to work for some inexplicable reason, create a container with a new name (it will create a new one), or delete the first one, and start it again.
\textcolor{green!60!blue!70}{
\subsection{Put Apache or Program logs from the Container in a volume that is locally accessible}}
This means you want a volume something like ./containerA\_files/logs:/var/www/log/apache2/ so that you can monitor the logs from your host machine easily. docker logs doesn't have everything.
\textcolor{green!60!blue!70}{
\subsection{Only Restart Containers you need to Restart}}
You can restart everything with docker-compose restart, but it's faster, and less prone to break initting containers, if you docker restart containername. Do the latter.
\textcolor{green!60!blue!70}{
\subsection{Volumes Mounting Over Existing Directories}}
As discussed here:
web.archive.org/web/https://github.com/moby/moby/issues/4361, if you add a volume to an existing container, it will seem to delete the folder's contents. I've seen mixed behaviour with this. Sometimes it deletes it even if you start a new container with the folder... Other times it has not. In any case, just docker cp the files to the folder, then add the volume mount.
\end{document}

+ 14
- 0
2019/Docker_Primer/docs/8.toc View File

@ -0,0 +1,14 @@
\contentsline {section}{\numberline {1}Overview}{1}
\contentsline {section}{\numberline {2}General Notes}{2}
\contentsline {subsection}{\numberline {2.1}Docker Commands Reference}{3}
\contentsline {section}{\numberline {3}Specific Tips}{4}
\contentsline {subsection}{\numberline {3.1}YAML is space sensitive}{4}
\contentsline {subsection}{\numberline {3.2}If you restart a containers namesake process, it will probably restart / reset the container}{4}
\contentsline {subsection}{\numberline {3.3}Use a single reverse proxy, to handle multiple websites}{4}
\contentsline {subsection}{\numberline {3.4}If you use a single reverse proxy, Lets Encrypt can be done easy}{5}
\contentsline {subsection}{\numberline {3.5}Give every Container a Containername}{5}
\contentsline {subsection}{\numberline {3.6}Beware of Interrupting Initting Containers}{6}
\contentsline {subsection}{\numberline {3.7}Put Apache or Program logs from the Container in a volume that is locally accessible}{6}
\contentsline {subsection}{\numberline {3.8}Only Restart Containers you need to Restart}{6}
\contentsline {subsection}{\numberline {3.9}Volumes Mounting Over Existing Directories}{6}
\contentsline {subsection}{\numberline {3.10}Further Reading}{6}

BIN
2019/Docker_Primer/docs/fin.pdf View File


+ 8
- 8
2019/Fail2Ban_Primer/docs/6.log View File

@ -1,4 +1,4 @@
This is pdfTeX, Version 3.14159265-2.6-1.40.15 (TeX Live 2015/dev/Debian) (preloaded format=pdflatex 2018.11.28) 29 MAY 2019 01:37
This is pdfTeX, Version 3.14159265-2.6-1.40.17 (TeX Live 2016/Debian) (preloaded format=pdflatex 2019.8.17) 20 DEC 2019 17:10
entering extended mode
restricted \write18 enabled.
%&-line parsing enabled.
@ -7,8 +7,8 @@ Primer/docs/6.tex
(/home/layoutdev/Desktop/code/documentation_general/IT_Articles/2019/Fail2Ban_P
rimer/docs/6.tex
LaTeX2e <2014/05/01>
Babel <3.9l> and hyphenation patterns for 2 languages loaded.
LaTeX2e <2017/01/01> patch level 3
Babel <3.9r> and hyphenation patterns for 3 language(s) loaded.
(/usr/share/texlive/texmf-dist/tex/latex/base/article.cls
Document Class: article 2014/09/29 v1.4h Standard LaTeX document class
(/usr/share/texlive/texmf-dist/tex/latex/base/size11.clo
@ -156,10 +156,10 @@ ban-so-thats-
[6] (./6.aux) )
Here is how much of TeX's memory you used:
261 strings out of 495020
3142 string characters out of 6181323
50970 words of memory out of 5000000
3542 multiletter control sequences out of 15000+600000
261 strings out of 494945
3135 string characters out of 6181032
51564 words of memory out of 5000000
3622 multiletter control sequences out of 15000+600000
8977 words of font info for 32 fonts, out of 8000000 for 9000
14 hyphenation exceptions out of 8191
23i,8n,19p,591b,241s stack positions out of 5000i,500n,10000p,200000b,80000s
@ -171,7 +171,7 @@ texlive/texmf-dist/fonts/type1/public/amsfonts/cm/cmr8.pfb>
texmf-dist/fonts/type1/public/amsfonts/cm/cmr9.pfb></usr/share/texlive/texmf-di
st/fonts/type1/public/amsfonts/cm/cmsy10.pfb></usr/share/texlive/texmf-dist/fon
ts/type1/public/amsfonts/cm/cmtt10.pfb>
Output written on 6.pdf (6 pages, 115833 bytes).
Output written on 6.pdf (6 pages, 116067 bytes).
PDF statistics:
55 PDF objects out of 1000 (max. 8388607)
38 compressed objects within 1 object stream

BIN
2019/Fail2Ban_Primer/docs/6.pdf View File


+ 6
- 0
2019/Fail2Ban_Primer/docs/7.aux View File

@ -0,0 +1,6 @@
\relax
\@writefile{toc}{\contentsline {section}{\numberline {1}Overview}{1}}
\@writefile{toc}{\contentsline {section}{\numberline {2}Instructions for Setup}{1}}
\@writefile{toc}{\contentsline {subsection}{\numberline {2.1}Getting auth.log to appear in Gentoo}{3}}
\@writefile{toc}{\contentsline {section}{\numberline {3}Future Advancements}{6}}
\@writefile{toc}{\contentsline {section}{\numberline {4}Further Reading}{6}}

+ 359
- 0
2019/Fail2Ban_Primer/docs/7.log View File

@ -0,0 +1,359 @@
This is pdfTeX, Version 3.14159265-2.6-1.40.17 (TeX Live 2016/Debian) (preloaded format=pdflatex 2019.8.17) 20 DEC 2019 17:11
entering extended mode
restricted \write18 enabled.
%&-line parsing enabled.
**/home/layoutdev/Desktop/code/documentation_general/IT_Articles/2019/Fail2Ban_
Primer/docs/7.tex
(/home/layoutdev/Desktop/code/documentation_general/IT_Articles/2019/Fail2Ban_P
rimer/docs/7.tex
LaTeX2e <2017/01/01> patch level 3
Babel <3.9r> and hyphenation patterns for 3 language(s) loaded.
(/usr/share/texlive/texmf-dist/tex/latex/base/article.cls
Document Class: article 2014/09/29 v1.4h Standard LaTeX document class
(/usr/share/texlive/texmf-dist/tex/latex/base/size11.clo
File: size11.clo 2014/09/29 v1.4h Standard LaTeX file (size option)
)
\c@part=\count79
\c@section=\count80
\c@subsection=\count81
\c@subsubsection=\count82
\c@paragraph=\count83
\c@subparagraph=\count84
\c@figure=\count85
\c@table=\count86
\abovecaptionskip=\skip41
\belowcaptionskip=\skip42
\bibindent=\dimen102
)
(/usr/share/texlive/texmf-dist/tex/latex/xcolor/xcolor.sty
Package: xcolor 2016/05/11 v2.12 LaTeX color extensions (UK)
(/usr/share/texlive/texmf-dist/tex/latex/graphics-cfg/color.cfg
File: color.cfg 2016/01/02 v1.6 sample color configuration
)
Package xcolor Info: Driver file: pdftex.def on input line 225.
(/usr/share/texlive/texmf-dist/tex/latex/graphics-def/pdftex.def
File: pdftex.def 2017/01/12 v0.06k Graphics/color for pdfTeX
(/usr/share/texlive/texmf-dist/tex/generic/oberdiek/infwarerr.sty
Package: infwarerr 2016/05/16 v1.4 Providing info/warning/error messages (HO)
)
(/usr/share/texlive/texmf-dist/tex/generic/oberdiek/ltxcmds.sty
Package: ltxcmds 2016/05/16 v1.23 LaTeX kernel commands for general use (HO)
)
\Gread@gobject=\count87
)
Package xcolor Info: Model `cmy' substituted by `cmy0' on input line 1348.
Package xcolor Info: Model `hsb' substituted by `rgb' on input line 1352.
Package xcolor Info: Model `RGB' extended on input line 1364.
Package xcolor Info: Model `HTML' substituted by `rgb' on input line 1366.
Package xcolor Info: Model `Hsb' substituted by `hsb' on input line 1367.
Package xcolor Info: Model `tHsb' substituted by `hsb' on input line 1368.
Package xcolor Info: Model `HSB' substituted by `hsb' on input line 1369.
Package xcolor Info: Model `Gray' substituted by `gray' on input line 1370.
Package xcolor Info: Model `wave' substituted by `hsb' on input line 1371.
)
(/usr/share/texlive/texmf-dist/tex/latex/geometry/geometry.sty
Package: geometry 2010/09/12 v5.6 Page Geometry
(/usr/share/texlive/texmf-dist/tex/latex/graphics/keyval.sty
Package: keyval 2014/10/28 v1.15 key=value parser (DPC)
\KV@toks@=\toks14
)
(/usr/share/texlive/texmf-dist/tex/generic/oberdiek/ifpdf.sty
Package: ifpdf 2016/05/14 v3.1 Provides the ifpdf switch
)
(/usr/share/texlive/texmf-dist/tex/generic/oberdiek/ifvtex.sty
Package: ifvtex 2016/05/16 v1.6 Detect VTeX and its facilities (HO)
Package ifvtex Info: VTeX not detected.
)
(/usr/share/texlive/texmf-dist/tex/generic/ifxetex/ifxetex.sty
Package: ifxetex 2010/09/12 v0.6 Provides ifxetex conditional
)
\Gm@cnth=\count88
\Gm@cntv=\count89
\c@Gm@tempcnt=\count90
\Gm@bindingoffset=\dimen103
\Gm@wd@mp=\dimen104
\Gm@odd@mp=\dimen105
\Gm@even@mp=\dimen106
\Gm@layoutwidth=\dimen107
\Gm@layoutheight=\dimen108
\Gm@layouthoffset=\dimen109
\Gm@layoutvoffset=\dimen110
\Gm@dimlist=\toks15
)
No file 7.aux.
\openout1 = `7.aux'.
LaTeX Font Info: Checking defaults for OML/cmm/m/it on input line 9.
LaTeX Font Info: ... okay on input line 9.
LaTeX Font Info: Checking defaults for T1/cmr/m/n on input line 9.
LaTeX Font Info: ... okay on input line 9.
LaTeX Font Info: Checking defaults for OT1/cmr/m/n on input line 9.
LaTeX Font Info: ... okay on input line 9.
LaTeX Font Info: Checking defaults for OMS/cmsy/m/n on input line 9.
LaTeX Font Info: ... okay on input line 9.
LaTeX Font Info: Checking defaults for OMX/cmex/m/n on input line 9.
LaTeX Font Info: ... okay on input line 9.
LaTeX Font Info: Checking defaults for U/cmr/m/n on input line 9.
LaTeX Font Info: ... okay on input line 9.
(/usr/share/texlive/texmf-dist/tex/context/base/mkii/supp-pdf.mkii
[Loading MPS to PDF converter (version 2006.09.02).]
\scratchcounter=\count91
\scratchdimen=\dimen111
\scratchbox=\box26
\nofMPsegments=\count92
\nofMParguments=\count93
\everyMPshowfont=\toks16
\MPscratchCnt=\count94
\MPscratchDim=\dimen112
\MPnumerator=\count95
\makeMPintoPDFobject=\count96
\everyMPtoPDFconversion=\toks17
)
*geometry* detected driver: dvips
*geometry* verbose mode - [ preamble ] result:
* driver: dvips
* paper: custom
* layout: <same size as paper>
* layoutoffset:(h,v)=(0.0pt,0.0pt)
* vratio: 1:1
* modes:
* h-part:(L,W,R)=(54.2025pt, 325.215pt, 54.2025pt)
* v-part:(T,H,B)=(79.49689pt, 491.43622pt, 79.49689pt)
* \paperwidth=433.62pt
* \paperheight=650.43pt
* \textwidth=325.215pt
* \textheight=491.43622pt
* \oddsidemargin=-18.06749pt
* \evensidemargin=-18.06749pt
* \topmargin=-29.7731pt
* \headheight=12.0pt
* \headsep=25.0pt
* \topskip=11.0pt
* \footskip=30.0pt
* \marginparwidth=59.0pt
* \marginparsep=10.0pt
* \columnsep=10.0pt
* \skip\footins=10.0pt plus 4.0pt minus 2.0pt
* \hoffset=0.0pt
* \voffset=0.0pt
* \mag=1000
* \@twocolumnfalse
* \@twosidefalse
* \@mparswitchfalse
* \@reversemarginfalse
* (1in=72.27pt=25.4mm, 1cm=28.453pt)
No file 7.toc.
\tf@toc=\write3
\openout3 = `7.toc'.
LaTeX Font Info: External font `cmex10' loaded for size
(Font) <10.95> on input line 17.
LaTeX Font Info: External font `cmex10' loaded for size
(Font) <8> on input line 17.
LaTeX Font Info: External font `cmex10' loaded for size
(Font) <6> on input line 17.
LaTeX Font Info: External font `cmex10' loaded for size
(Font) <9> on input line 17.
LaTeX Font Info: External font `cmex10' loaded for size
(Font) <5> on input line 17.
LaTeX Font Info: Try loading font information for OMS+cmr on input line 27.
(/usr/share/texlive/texmf-dist/tex/latex/base/omscmr.fd
File: omscmr.fd 2014/09/29 v2.5h Standard LaTeX font definitions
)
LaTeX Font Info: Font shape `OMS/cmr/m/n' in size <10.95> not available
(Font) Font shape `OMS/cmsy/m/n' tried instead on input line 27.
Overfull \hbox (2.43376pt too wide) in paragraph at lines 26--30
\OT1/cmr/m/n/10.95 ond, nav-i-gate to /etc/fail2ban/jail.d/ Add the fol-low-ing
to a sshd.conf
[]
Overfull \hbox (100.1879pt too wide) in paragraph at lines 44--44
[]\OT1/cmtt/m/n/10.95 # this is used in devuan. no other changes are made to ot
her files, except[]
[]
Overfull \hbox (65.69577pt too wide) in paragraph at lines 44--44
[]\OT1/cmtt/m/n/10.95 # that the default ssh filter is disabled in jail.conf if
it enabled[]
[]
[1
Non-PDF special ignored!
{/var/lib/texmf/fonts/map/pdftex/updmap/pdftex.map}]
Overfull \hbox (1.85292pt too wide) in paragraph at lines 49--50
[]\OT1/cmr/m/n/10.95 First, ac-tion can be ipt-a-bles for a sin-gle port, or ip
tables-multiport
[]
Overfull \hbox (3.43622pt too wide) in paragraph at lines 61--62
\OT1/cmr/m/n/10.95 For those un-fa-mil-iar with the dif-fer-ence be-tween RE-JE
CT and DROP,
[]
Overfull \hbox (48.8393pt too wide) in paragraph at lines 63--64
[]\OT1/cmr/bx/n/10.95 To con-fig-ure it, see /etc/fail2ban/actions.d/iptables-c
ommon.conf
[]
[2]
Overfull \hbox (7.3905pt too wide) in paragraph at lines 76--76
[][]\OT1/cmr/m/n/9 Reference: https://wiki.gentoo.org/wiki/Security[]Handbook/L
ogging#Syslog-
[]
Overfull \hbox (2.4602pt too wide) in paragraph at lines 171--171
[]\OT1/cmtt/m/n/10.95 @version: 3.17 #mandatory since Version 3, specify
[]
[]
Overfull \hbox (42.70102pt too wide) in paragraph at lines 171--171
[] \OT1/cmtt/m/n/10.95 # The default action of syslog-ng is to log a STA
TS line[]
[]
Overfull \hbox (100.1879pt too wide) in paragraph at lines 171--171
[] \OT1/cmtt/m/n/10.95 # to the file every 10 minutes. That's pretty ug
ly after a while.[]
[]
Overfull \hbox (82.94183pt too wide) in paragraph at lines 171--171
[] \OT1/cmtt/m/n/10.95 # Change it to every 12 hours so you get a nice d
aily update of[]
[]
[3]
Overfull \hbox (8.2089pt too wide) in paragraph at lines 171--171
[]\OT1/cmtt/m/n/10.95 destination newscrit { file("/var/log/news/news.crit"); }
;[]
[]
Overfull \hbox (31.20364pt too wide) in paragraph at lines 171--171
[]\OT1/cmtt/m/n/10.95 destination newsnotice { file("/var/log/news/news.notice"
); };[]
[]
Overfull \hbox (48.4497pt too wide) in paragraph at lines 171--171
[]\OT1/cmtt/m/n/10.95 # ...if you intend to use /dev/console for programs like
xconsole[]
[]
[4]
Overfull \hbox (105.93658pt too wide) in paragraph at lines 171--171
[]\OT1/cmtt/m/n/10.95 # you can comment out the destination line above that ref
erences /dev/tty12[]
[]
Overfull \hbox (25.45496pt too wide) in paragraph at lines 171--171
[]\OT1/cmtt/m/n/10.95 filter f_debug { not facility(auth, authpriv, news, mail)
; };[]
[]
Overfull \hbox (36.95233pt too wide) in paragraph at lines 171--171
[]\OT1/cmtt/m/n/10.95 log { source(src); filter(f_authpriv); destination(authlo
g); };[]
[]
Overfull \hbox (19.70627pt too wide) in paragraph at lines 171--171
[]\OT1/cmtt/m/n/10.95 log { source(src); filter(f_syslog); destination(syslog);
};[]
[]
Overfull \hbox (19.70627pt too wide) in paragraph at lines 171--171
[]\OT1/cmtt/m/n/10.95 log { source(src); filter(f_daemon); destination(daemon);
};[]
[]
Overfull \hbox (19.70627pt too wide) in paragraph at lines 171--171
[]\OT1/cmtt/m/n/10.95 log { source(kernsrc); filter(f_kern); destination(kern);
};[]
[]
Overfull \hbox (111.68527pt too wide) in paragraph at lines 171--171
[]\OT1/cmtt/m/n/10.95 log { source(src); filter(f_mail); filter(f_info); destin
ation(mailinfo); };[]
[]
[5]
Overfull \hbox (111.68527pt too wide) in paragraph at lines 171--171
[]\OT1/cmtt/m/n/10.95 log { source(src); filter(f_mail); filter(f_warn); destin
ation(mailwarn); };[]
[]
Overfull \hbox (100.1879pt too wide) in paragraph at lines 171--171
[]\OT1/cmtt/m/n/10.95 log { source(src); filter(f_mail); filter(f_err); destina
tion(mailerr); };[]
[]
Overfull \hbox (8.2089pt too wide) in paragraph at lines 171--171
[]\OT1/cmtt/m/n/10.95 log { source(src); filter(f_debug); destination(debug); }
;[]
[]
Overfull \hbox (42.70102pt too wide) in paragraph at lines 171--171
[]\OT1/cmtt/m/n/10.95 log { source(src); filter(f_messages); destination(messag
es); };[]
[]
Overfull \hbox (42.70102pt too wide) in paragraph at lines 171--171
[]\OT1/cmtt/m/n/10.95 log { source(src); filter(f_emergency); destination(conso
le); };[]
[]
Overfull \hbox (1.21407pt too wide) in paragraph at lines 183--184
[]\OT1/cmr/m/n/10.95 https://www.jwz.org/blog/2019/03/apache-2-4-1-killed-fail2
ban-
[]
[6] (./7.aux) )
Here is how much of TeX's memory you used:
1956 strings out of 494945
25770 string characters out of 6181032
91871 words of memory out of 5000000
5279 multiletter control sequences out of 15000+600000
8977 words of font info for 32 fonts, out of 8000000 for 9000
14 hyphenation exceptions out of 8191
24i,8n,35p,591b,250s stack positions out of 5000i,500n,10000p,200000b,80000s
</usr/share/texlive/texmf-dist/fonts/type1/public/amsfonts/cm/cm
bx10.pfb></usr/share/texlive/texmf-dist/fonts/type1/public/amsfonts/cm/cmbx12.p
fb></usr/share/texlive/texmf-dist/fonts/type1/public/amsfonts/cm/cmr10.pfb></us
r/share/texlive/texmf-dist/fonts/type1/public/amsfonts/cm/cmr6.pfb></usr/share/
texlive/texmf-dist/fonts/type1/public/amsfonts/cm/cmr8.pfb></usr/share/texlive/
texmf-dist/fonts/type1/public/amsfonts/cm/cmr9.pfb></usr/share/texlive/texmf-di
st/fonts/type1/public/amsfonts/cm/cmsy10.pfb></usr/share/texlive/texmf-dist/fon
ts/type1/public/amsfonts/cm/cmtt10.pfb>
Output written on 7.pdf (6 pages, 113538 bytes).
PDF statistics:
55 PDF objects out of 1000 (max. 8388607)
38 compressed objects within 1 object stream
0 named destinations out of 1000 (max. 500000)
1 words of extra memory for PDF output out of 10000 (max. 10000000)

BIN
2019/Fail2Ban_Primer/docs/7.pdf View File


+ 192
- 0
2019/Fail2Ban_Primer/docs/7.tex View File

@ -0,0 +1,192 @@
\documentclass[11pt]{article}
%Gummi|065|=)
\usepackage{xcolor}
\usepackage[vcentering,dvips]{geometry}
\geometry{papersize={6in,9in},total={4.5in,6.8in}}
\title{\textbf{Fail2ban Primer}}
\author{Steak Electronics}
\date{05/29/19}
\begin{document}
\textbf{Fail2ban Primer}
%maketitle
\tableofcontents
\textcolor{green!60!blue!70}{
\section{Overview}}
Fail2Ban is a firewall adjunct, a spiritual successor to denyhosts\footnote{denyhosts was used for ssh, but eventually was abandoned. It was quite a bit simpler to configure than fail2ban, and this was its strength, but it is also more limited, and now has vulnerabilities.}, which is used to block ip addresses that try to break into your internet server.
Here are some of the traps, and configurations I've needed to setup fail2ban correctly. It's not a complex program, but unless you sit down and understand it, you might get caught. To be honest, it took me some time to figure out fail2ban, as I initially didn't have the patience to sit down and configure it.
\textcolor{green!60!blue!70}{
\section{Instructions for Setup}}
Quick setup for Devuan / Debian 9:
First install fail2ban using apt-get. (apt-get install fail2ban).
Fail2ban is a service that will appear in /etc/init.d/ in Devuan.
So it can be managed with service fail2ban \{start,stop,restart\}.
Second, navigate to /etc/fail2ban/jail.d/
Add the following to a sshd.conf file (or name it anything you like)
\begin{verbatim}
# this is used in devuan. no other changes are made to other files, except
# that the default ssh filter is disabled in jail.conf if it enabled
[sshd]
ignoreip = 127.0.0.1/8
action = iptables-allports
maxretry = 6
enabled = true
filter = sshd
logpath = /var/log/auth.log
bantime = 360000
findtime = 3600
\end{verbatim}
Now, a few notes on this file.
\vspace{0.2in}
First, action can be iptables for a single port, or iptables-multiport for more than one, but we are using iptables-allports, as we want to block everything. These actions are listed in /etc/fail2ban/actions.d/
\vspace{0.2in}
Second, logpath, should point to your ssh log. In devuan ascii / debian stretch (9) it should be /var/log/auth.log. Other distributions may vary. The format of the ssh log can vary as well. In this guide, it's assumed to be auth.log. Gentoo users see below to enable auth.log in syslog-ng.
\vspace{0.2in}
Third, be careful of different ssh ports. I routinely change ssh ports to be a non standard port, which although it's somewhat pointless, it still seems to block random ssh port scans for port 22. If you use a different port, you must specify it in iptables-multiport above. A potential trap is to use a nonstandard port, then wonder why fail2ban blocks port 22, but your ssh is on port 123 or something. An agressive and easier approach is to just block everything.
\vspace{0.2in}
Fourth, the default action in iptables-common \footnote{this parent file in actions.d applies to all child iptables of course, being named ``common''} is to REJECT packets. However, I have changed it to DROP (blocktype=DROP). For those unfamiliar with the difference between REJECT and DROP, from my understanding, it is that REJECT will alert the outside host that the post is unreachable, while DROP simply goes silent, leaving the other host to figure it out on their own.
\textbf{To configure it, see /etc/fail2ban/actions.d/iptables-common.conf and search for blocktype.}
As I consider the offending ip addresses to be attackers, I have set it to DROP. If they try to break into the server, then block all ports from them, and don't tell them anything. The DROP timeout is more work on their end. With REJECT, my server responds. No need to play nice, with people/robots that have no morals.
On fail2ban issues git tracker, there is some discussion about this, and it is not really definitive. It ends up being that, REJECT is default, and if you want you can change it to DROP. As I have. As long as the option is there, I think that is acceptable.
\vspace{0.2in}
Fifth, review jail.conf, and fail2ban.conf. Usually nothing needs to be changed, but occasionally jail.conf will enable the default sshd jail (which you can disable, and use instead the new one). This will be distribution dependent.
\textcolor{green!60!blue!70}{
\subsection{Getting auth.log to appear in Gentoo}}
This guide will only cover those working with syslog-ng in Gentoo. You can add a config to syslog-ng to get auth.log to appear in Gentoo.
\footnote{Reference: https://wiki.gentoo.org/wiki/Security\_Handbook/Logging\#Syslog-ng} Notice in the below config, that a destination has been defined for authlog. You need not copy all the syslog-ng below, only what you need.
\begin{verbatim}
/etc/syslog-ng/syslog-ng.confSyslog-ng
@version: 3.17 #mandatory since Version 3, specify
the version number of the used syslog-ng
options {
chain_hostnames(no);
# The default action of syslog-ng is to log a STATS line
# to the file every 10 minutes. That's pretty ugly after a while.
# Change it to every 12 hours so you get a nice daily update of
# how many messages syslog-ng missed (0).
stats_freq(43200);
};
source src {
unix-stream("/dev/log" max-connections(256));
internal();
};
source kernsrc { file("/proc/kmsg"); };
# define destinations
destination authlog { file("/var/log/auth.log"); };
destination syslog { file("/var/log/syslog"); };
destination cron { file("/var/log/cron.log"); };
destination daemon { file("/var/log/daemon.log"); };
destination kern { file("/var/log/kern.log"); };
destination lpr { file("/var/log/lpr.log"); };
destination user { file("/var/log/user.log"); };
destination mail { file("/var/log/mail.log"); };
destination mailinfo { file("/var/log/mail.info"); };
destination mailwarn { file("/var/log/mail.warn"); };
destination mailerr { file("/var/log/mail.err"); };
destination newscrit { file("/var/log/news/news.crit"); };
destination newserr { file("/var/log/news/news.err"); };
destination newsnotice { file("/var/log/news/news.notice"); };
destination debug { file("/var/log/debug"); };
destination messages { file("/var/log/messages"); };
destination console { usertty("root"); };
# By default messages are logged to tty12...
destination console_all { file("/dev/tty12"); };
# ...if you intend to use /dev/console for programs like xconsole
# you can comment out the destination line above that references /dev/tty12
# and uncomment the line below.
#destination console_all { file("/dev/console"); };
# create filters
filter f_authpriv { facility(auth, authpriv); };
filter f_syslog { not facility(authpriv, mail); };
filter f_cron { facility(cron); };
filter f_daemon { facility(daemon); };
filter f_kern { facility(kern); };
filter f_lpr { facility(lpr); };
filter f_mail { facility(mail); };
filter f_user { facility(user); };
filter f_debug { not facility(auth, authpriv, news, mail); };
filter f_messages { level(info..warn)
and not facility(auth, authpriv, mail, news); };
filter f_emergency { level(emerg); };
filter f_info { level(info); };
filter f_notice { level(notice); };
filter f_warn { level(warn); };
filter f_crit { level(crit); };
filter f_err { level(err); };
filter f_failed { message("failed"); };
filter f_denied { message("denied"); };
# connect filter and destination
log { source(src); filter(f_authpriv); destination(authlog); };
log { source(src); filter(f_syslog); destination(syslog); };
log { source(src); filter(f_cron); destination(cron); };
log { source(src); filter(f_daemon); destination(daemon); };
log { source(kernsrc); filter(f_kern); destination(kern); };
log { source(src); filter(f_lpr); destination(lpr); };
log { source(src); filter(f_mail); destination(mail); };
log { source(src); filter(f_user); destination(user); };
log { source(src); filter(f_mail); filter(f_info); destination(mailinfo); };
log { source(src); filter(f_mail); filter(f_warn); destination(mailwarn); };
log { source(src); filter(f_mail); filter(f_err); destination(mailerr); };
log { source(src); filter(f_debug); destination(debug); };
log { source(src); filter(f_messages); destination(messages); };
log { source(src); filter(f_emergency); destination(console); };
# default log
log { source(src); destination(console_all); };
\end{verbatim}
\textcolor{green!60!blue!70}{
\section{Future Advancements}}
What is next for fail2ban after the above? You will want to watch apache logs, and ban any hosts from your IP that search for things they should not be looking for (wordpress logins, phpmyadmin, etc).
Gentoo has a use flag to use a DB to do persistent blocking over time. This way you can block offending IPs through restarts.
\textcolor{green!60!blue!70}{
\section{Further Reading}}
https://github.com/fail2ban/fail2ban/issues/2217
https://www.jwz.org/blog/2019/03/apache-2-4-1-killed-fail2ban-so-thats-awesome/
https://www.fail2ban.org/wiki/index.php/Apache
https://www.fail2ban.org/wiki/index.php/
\end{document}

+ 5
- 0
2019/Fail2Ban_Primer/docs/7.toc View File

@ -0,0 +1,5 @@
\contentsline {section}{\numberline {1}Overview}{1}
\contentsline {section}{\numberline {2}Instructions for Setup}{1}
\contentsline {subsection}{\numberline {2.1}Getting auth.log to appear in Gentoo}{3}
\contentsline {section}{\numberline {3}Future Advancements}{6}
\contentsline {section}{\numberline {4}Further Reading}{6}

BIN
2019/Fail2Ban_Primer/docs/fin.pdf View File


+ 40
- 0
2019/Mediawiki_Docker_SetupGuide/docs/notes View File

@ -0,0 +1,40 @@
setup docker for mediawiki
following official compose.
wait until it inits (give it a few minutes).
i use a reverse proxy to access the container.
if you do, edit hte reverse proxy config:
login to mediawiki, and go through the steps to configure it.
check the db, to make sure you have something there...
I check the users table.
if the user is in there, the install completed successfully.
go to the install page again, and you should be able to download localsettings.php
Troubleshooting:
my wiki db is empty after setup!
if your db fails to init, you can always create the db after.
docker cp mediawiki:/var/www/html/maintenance/tables.sql .
docker cp tables.sql mediawiki_db:/.
then init into the db and
import the sql.
That tables.sql command will create the db. Note that you will need
to manually create the user but there is also some scripts in maintenance, as well
as documentation on mediawiki regarding that. Search online.

+ 1204
- 0
2019/Mediawiki_Navbox_Setup/code/Common.css
File diff suppressed because it is too large
View File


+ 1265
- 0
2019/Mediawiki_Navbox_Setup/code/Wikipedia-20191028012859.xml
File diff suppressed because it is too large
View File


BIN
2019/Mediawiki_Navbox_Setup/pics/almostthere.png View File

Before After
Width: 752  |  Height: 385  |  Size: 39 KiB

BIN
2019/Mediawiki_Navbox_Setup/pics/done.png View File

Before After
Width: 619  |  Height: 258  |  Size: 36 KiB

+ 8
- 0
2019/RAID_On_Gnulinux_Mdadm_Reference/docs/6.aux View File

@ -0,0 +1,8 @@
\relax
\@writefile{toc}{\contentsline {section}{\numberline {1}Overview}{1}}
\@writefile{toc}{\contentsline {section}{\numberline {2}Details}{1}}
\@writefile{toc}{\contentsline {subsection}{\numberline {2.1}Creation of RAID:}{1}}
\@writefile{toc}{\contentsline {subsection}{\numberline {2.2}Details of RAID:}{1}}
\@writefile{toc}{\contentsline {subsection}{\numberline {2.3}Add Drive to RAID:}{2}}
\@writefile{toc}{\contentsline {subsection}{\numberline {2.4}Email Notifications on mdadm}{5}}
\@writefile{toc}{\contentsline {section}{\numberline {3}References}{5}}

+ 386
- 0
2019/RAID_On_Gnulinux_Mdadm_Reference/docs/6.log View File

@ -0,0 +1,386 @@
This is pdfTeX, Version 3.14159265-2.6-1.40.17 (TeX Live 2016/Debian) (preloaded format=pdflatex 2019.8.17) 4 MAY 2020 22:08
entering extended mode
restricted \write18 enabled.
%&-line parsing enabled.
**/home/layoutdev/Desktop/code/documentation_general/IT_Articles/2019/RAID_On_G
nulinux_Mdadm_Reference/docs/6.tex
(/home/layoutdev/Desktop/code/documentation_general/IT_Articles/2019/RAID_On_Gn
ulinux_Mdadm_Reference/docs/6.tex
LaTeX2e <2017/01/01> patch level 3
Babel <3.9r> and hyphenation patterns for 3 language(s) loaded.
(/usr/share/texlive/texmf-dist/tex/latex/base/article.cls
Document Class: article 2014/09/29 v1.4h Standard LaTeX document class
(/usr/share/texlive/texmf-dist/tex/latex/base/size11.clo
File: size11.clo 2014/09/29 v1.4h Standard LaTeX file (size option)
)
\c@part=\count79
\c@section=\count80
\c@subsection=\count81
\c@subsubsection=\count82
\c@paragraph=\count83
\c@subparagraph=\count84
\c@figure=\count85
\c@table=\count86
\abovecaptionskip=\skip41
\belowcaptionskip=\skip42
\bibindent=\dimen102
)
(/usr/share/texlive/texmf-dist/tex/latex/xcolor/xcolor.sty
Package: xcolor 2016/05/11 v2.12 LaTeX color extensions (UK)
(/usr/share/texlive/texmf-dist/tex/latex/graphics-cfg/color.cfg
File: color.cfg 2016/01/02 v1.6 sample color configuration
)
Package xcolor Info: Driver file: pdftex.def on input line 225.
(/usr/share/texlive/texmf-dist/tex/latex/graphics-def/pdftex.def
File: pdftex.def 2017/01/12 v0.06k Graphics/color for pdfTeX
(/usr/share/texlive/texmf-dist/tex/generic/oberdiek/infwarerr.sty
Package: infwarerr 2016/05/16 v1.4 Providing info/warning/error messages (HO)
)
(/usr/share/texlive/texmf-dist/tex/generic/oberdiek/ltxcmds.sty
Package: ltxcmds 2016/05/16 v1.23 LaTeX kernel commands for general use (HO)
)
\Gread@gobject=\count87
)
Package xcolor Info: Model `cmy' substituted by `cmy0' on input line 1348.
Package xcolor Info: Model `hsb' substituted by `rgb' on input line 1352.
Package xcolor Info: Model `RGB' extended on input line 1364.
Package xcolor Info: Model `HTML' substituted by `rgb' on input line 1366.
Package xcolor Info: Model `Hsb' substituted by `hsb' on input line 1367.
Package xcolor Info: Model `tHsb' substituted by `hsb' on input line 1368.
Package xcolor Info: Model `HSB' substituted by `hsb' on input line 1369.
Package xcolor Info: Model `Gray' substituted by `gray' on input line 1370.
Package xcolor Info: Model `wave' substituted by `hsb' on input line 1371.
)
(/usr/share/texlive/texmf-dist/tex/latex/geometry/geometry.sty
Package: geometry 2010/09/12 v5.6 Page Geometry
(/usr/share/texlive/texmf-dist/tex/latex/graphics/keyval.sty
Package: keyval 2014/10/28 v1.15 key=value parser (DPC)
\KV@toks@=\toks14
)
(/usr/share/texlive/texmf-dist/tex/generic/oberdiek/ifpdf.sty
Package: ifpdf 2016/05/14 v3.1 Provides the ifpdf switch
)
(/usr/share/texlive/texmf-dist/tex/generic/oberdiek/ifvtex.sty
Package: ifvtex 2016/05/16 v1.6 Detect VTeX and its facilities (HO)
Package ifvtex Info: VTeX not detected.
)
(/usr/share/texlive/texmf-dist/tex/generic/ifxetex/ifxetex.sty
Package: ifxetex 2010/09/12 v0.6 Provides ifxetex conditional
)
\Gm@cnth=\count88
\Gm@cntv=\count89
\c@Gm@tempcnt=\count90
\Gm@bindingoffset=\dimen103
\Gm@wd@mp=\dimen104
\Gm@odd@mp=\dimen105
\Gm@even@mp=\dimen106
\Gm@layoutwidth=\dimen107
\Gm@layoutheight=\dimen108
\Gm@layouthoffset=\dimen109
\Gm@layoutvoffset=\dimen110
\Gm@dimlist=\toks15
)
(/usr/share/texlive/texmf-dist/tex/latex/graphics/graphicx.sty
Package: graphicx 2014/10/28 v1.0g Enhanced LaTeX Graphics (DPC,SPQR)
(/usr/share/texlive/texmf-dist/tex/latex/graphics/graphics.sty
Package: graphics 2016/10/09 v1.0u Standard LaTeX Graphics (DPC,SPQR)
(/usr/share/texlive/texmf-dist/tex/latex/graphics/trig.sty
Package: trig 2016/01/03 v1.10 sin cos tan (DPC)
)
(/usr/share/texlive/texmf-dist/tex/latex/graphics-cfg/graphics.cfg
File: graphics.cfg 2016/06/04 v1.11 sample graphics configuration
)
Package graphics Info: Driver file: pdftex.def on input line 99.
)
\Gin@req@height=\dimen111
\Gin@req@width=\dimen112
)
(/usr/share/texlive/texmf-dist/tex/latex/caption/caption.sty
Package: caption 2016/02/21 v3.3-144 Customizing captions (AR)
(/usr/share/texlive/texmf-dist/tex/latex/caption/caption3.sty
Package: caption3 2016/05/22 v1.7-166 caption3 kernel (AR)
Package caption3 Info: TeX engine: e-TeX on input line 67.
\captionmargin=\dimen113
\captionmargin@=\dimen114
\captionwidth=\dimen115
\caption@tempdima=\dimen116
\caption@indent=\dimen117
\caption@parindent=\dimen118
\caption@hangindent=\dimen119
)
\c@ContinuedFloat=\count91
) (./6.aux)
\openout1 = `6.aux'.
LaTeX Font Info: Checking defaults for OML/cmm/m/it on input line 11.
LaTeX Font Info: ... okay on input line 11.
LaTeX Font Info: Checking defaults for T1/cmr/m/n on input line 11.
LaTeX Font Info: ... okay on input line 11.
LaTeX Font Info: Checking defaults for OT1/cmr/m/n on input line 11.
LaTeX Font Info: ... okay on input line 11.
LaTeX Font Info: Checking defaults for OMS/cmsy/m/n on input line 11.
LaTeX Font Info: ... okay on input line 11.
LaTeX Font Info: Checking defaults for OMX/cmex/m/n on input line 11.
LaTeX Font Info: ... okay on input line 11.
LaTeX Font Info: Checking defaults for U/cmr/m/n on input line 11.
LaTeX Font Info: ... okay on input line 11.
(/usr/share/texlive/texmf-dist/tex/context/base/mkii/supp-pdf.mkii
[Loading MPS to PDF converter (version 2006.09.02).]
\scratchcounter=\count92
\scratchdimen=\dimen120
\scratchbox=\box26
\nofMPsegments=\count93
\nofMParguments=\count94
\everyMPshowfont=\toks16
\MPscratchCnt=\count95
\MPscratchDim=\dimen121
\MPnumerator=\count96
\makeMPintoPDFobject=\count97
\everyMPtoPDFconversion=\toks17
) (/usr/share/texlive/texmf-dist/tex/generic/oberdiek/pdftexcmds.sty
Package: pdftexcmds 2016/05/21 v0.22 Utility functions of pdfTeX for LuaTeX (HO
)
(/usr/share/texlive/texmf-dist/tex/generic/oberdiek/ifluatex.sty
Package: ifluatex 2016/05/16 v1.4 Provides the ifluatex switch (HO)
Package ifluatex Info: LuaTeX not detected.
)
Package pdftexcmds Info: LuaTeX not detected.
Package pdftexcmds Info: \pdf@primitive is available.
Package pdftexcmds Info: \pdf@ifprimitive is available.
Package pdftexcmds Info: \pdfdraftmode found.
)
(/usr/share/texlive/texmf-dist/tex/latex/oberdiek/epstopdf-base.sty
Package: epstopdf-base 2016/05/15 v2.6 Base part for package epstopdf
(/usr/share/texlive/texmf-dist/tex/latex/oberdiek/grfext.sty
Package: grfext 2016/05/16 v1.2 Manage graphics extensions (HO)
(/usr/share/texlive/texmf-dist/tex/generic/oberdiek/kvdefinekeys.sty
Package: kvdefinekeys 2016/05/16 v1.4 Define keys (HO)
))
(/usr/share/texlive/texmf-dist/tex/latex/oberdiek/kvoptions.sty
Package: kvoptions 2016/05/16 v3.12 Key value format for package options (HO)
(/usr/share/texlive/texmf-dist/tex/generic/oberdiek/kvsetkeys.sty
Package: kvsetkeys 2016/05/16 v1.17 Key value parser (HO)
(/usr/share/texlive/texmf-dist/tex/generic/oberdiek/etexcmds.sty
Package: etexcmds 2016/05/16 v1.6 Avoid name clashes with e-TeX commands (HO)
Package etexcmds Info: Could not find \expanded.
(etexcmds) That can mean that you are not using pdfTeX 1.50 or
(etexcmds) that some package has redefined \expanded.
(etexcmds) In the latter case, load this package earlier.
)))
Package epstopdf-base Info: Redefining graphics rule for `.eps' on input line 4
38.
Package grfext Info: Graphics extension search list:
(grfext) [.png,.pdf,.jpg,.mps,.jpeg,.jbig2,.jb2,.PNG,.PDF,.JPG,.JPE
G,.JBIG2,.JB2,.eps]
(grfext) \AppendGraphicsExtensions on input line 456.
(/usr/share/texlive/texmf-dist/tex/latex/latexconfig/epstopdf-sys.cfg
File: epstopdf-sys.cfg 2010/07/13 v1.3 Configuration of (r)epstopdf for TeX Liv
e
))
*geometry* detected driver: dvips
*geometry* verbose mode - [ preamble ] result:
* driver: dvips
* paper: custom
* layout: <same size as paper>
* layoutoffset:(h,v)=(0.0pt,0.0pt)
* vratio: 1:1
* modes:
* h-part:(L,W,R)=(54.2025pt, 325.215pt, 54.2025pt)
* v-part:(T,H,B)=(79.49689pt, 491.43622pt, 79.49689pt)
* \paperwidth=433.62pt
* \paperheight=650.43pt
* \textwidth=325.215pt
* \textheight=491.43622pt
* \oddsidemargin=-18.06749pt
* \evensidemargin=-18.06749pt
* \topmargin=-29.7731pt
* \headheight=12.0pt
* \headsep=25.0pt
* \topskip=11.0pt
* \footskip=30.0pt
* \marginparwidth=59.0pt
* \marginparsep=10.0pt
* \columnsep=10.0pt
* \skip\footins=10.0pt plus 4.0pt minus 2.0pt
* \hoffset=0.0pt
* \voffset=0.0pt
* \mag=1000
* \@twocolumnfalse
* \@twosidefalse
* \@mparswitchfalse
* \@reversemarginfalse
* (1in=72.27pt=25.4mm, 1cm=28.453pt)
Package caption Info: Begin \AtBeginDocument code.
Package caption Info: End \AtBeginDocument code.
Underfull \hbox (badness 10000) in paragraph at lines 24--28
[]
[1
Non-PDF special ignored!
{/var/lib/texmf/fonts/map/pdftex/updmap/pdftex.map}]
Overfull \hbox (36.95233pt too wide) in paragraph at lines 61--61
[] \OT1/cmtt/m/n/10.95 1 8 17 1 active sync /de
v/sdb1[]
[]
Overfull \hbox (36.95233pt too wide) in paragraph at lines 61--61
[] \OT1/cmtt/m/n/10.95 2 8 33 2 active sync /de
v/sdc1[]
[]
Underfull \hbox (badness 10000) in paragraph at lines 63--67
[]
Underfull \hbox (badness 10000) in paragraph at lines 68--83
[]
Underfull \hbox (badness 10000) in paragraph at lines 68--83
[]
Underfull \hbox (badness 10000) in paragraph at lines 68--83
[]
Overfull \hbox (14.87413pt too wide) in paragraph at lines 68--83
\OT1/cmr/m/n/10.95 to-copy-the-partition-layout-of-a-whole-disk-using-standard-
tools or aka
[]
[2]
Overfull \hbox (71.44446pt too wide) in paragraph at lines 101--101
[]\OT1/cmtt/m/n/10.95 sgdisk --backup=/partitions-backup-$(basename $source).sg
disk $source[]
[]
Overfull \hbox (48.4497pt too wide) in paragraph at lines 101--101
[]\OT1/cmtt/m/n/10.95 sgdisk --backup=/partitions-backup-$(basename $dest).sgdi
sk $dest[]
[]
[3]
Overfull \hbox (65.69577pt too wide) in paragraph at lines 136--136
[] \OT1/cmtt/m/n/10.95 3 8 1 0 spare rebuilding
/dev/sda1[]
[]
Overfull \hbox (36.95233pt too wide) in paragraph at lines 136--136
[] \OT1/cmtt/m/n/10.95 1 8 17 1 active sync /de
v/sdb1[]
[]
Overfull \hbox (36.95233pt too wide) in paragraph at lines 136--136
[] \OT1/cmtt/m/n/10.95 2 8 33 2 active sync /de
v/sdc1[]
[]
Overfull \hbox (65.69577pt too wide) in paragraph at lines 149--149
[] \OT1/cmtt/m/n/10.95 3 8 1 0 spare rebuilding
/dev/sda1[]
[]
Overfull \hbox (36.95233pt too wide) in paragraph at lines 149--149
[] \OT1/cmtt/m/n/10.95 1 8 17 1 active sync /de
v/sdb1[]
[]
Overfull \hbox (36.95233pt too wide) in paragraph at lines 149--149
[] \OT1/cmtt/m/n/10.95 2 8 33 2 active sync /de
v/sdc1[]
[]
Overfull \hbox (163.42346pt too wide) in paragraph at lines 167--167
[]\OT1/cmtt/m/n/10.95 Personalities : [raid1] [linear] [multipath] [raid0] [rai
d6] [raid5] [raid4] [raid10][]
[]
[4]
Overfull \hbox (238.1564pt too wide) in paragraph at lines 167--167
[] \OT1/cmtt/m/n/10.95 [==>..................] recovery = 11.2% (6471936/
57638912) finish=13.2min speed=64324K/sec[]
[]
Overfull \hbox (200.28224pt too wide) in paragraph at lines 175--178
\OT1/cmr/m/n/10.95 (i cur-rently use ssmtp, see this link: https://wiki.zonemin
der.com/How[]to[]get[]ssmtp[]working[]with[]Zoneminder
[]
Overfull \hbox (5.74626pt too wide) in paragraph at lines 180--182
[]\OT1/cmr/m/n/10.95 then edit /etc/mdadm/mdadm.conf to have your email in mail
addr
[]
Overfull \hbox (71.44446pt too wide) in paragraph at lines 205--205
[]\OT1/cmtt/m/n/10.95 https://help.ubuntu.com/lts/serverguide/advanced-installa
tion.html.en[]
[]
Overfull \hbox (48.4497pt too wide) in paragraph at lines 205--205
[]\OT1/cmtt/m/n/10.95 https://github.com/zfsonlinux/zfs/wiki/Debian-Stretch-Roo
t-on-ZFS[]
[]
Overfull \hbox (65.69577pt too wide) in paragraph at lines 205--205
[]\OT1/cmtt/m/n/10.95 https://wiki.zoneminder.com/How_to_get_ssmtp_working_with
_Zoneminder[]
[]
[5] (./6.aux) )
Here is how much of TeX's memory you used:
3486 strings out of 494945
53018 string characters out of 6181032
124333 words of memory out of 5000000
6774 multiletter control sequences out of 15000+600000
5626 words of font info for 21 fonts, out of 8000000 for 9000
14 hyphenation exceptions out of 8191
39i,5n,38p,456b,250s stack positions out of 5000i,500n,10000p,200000b,80000s
</usr/share/texlive/texmf-dist/fonts/type1/public/amsfonts/cm/cm
bx10.pfb></usr/share/texlive/texmf-dist/fonts/type1/public/amsfonts/cm/cmbx12.p
fb></usr/share/texlive/texmf-dist/fonts/type1/public/amsfonts/cm/cmr10.pfb></us
r/share/texlive/texmf-dist/fonts/type1/public/amsfonts/cm/cmtt10.pfb>
Output written on 6.pdf (5 pages, 74812 bytes).
PDF statistics:
36 PDF objects out of 1000 (max. 8388607)
24 compressed objects within 1 object stream
0 named destinations out of 1000 (max. 500000)
1 words of extra memory for PDF output out of 10000 (max. 10000000)

BIN
2019/RAID_On_Gnulinux_Mdadm_Reference/docs/6.pdf View File


+ 206
- 0
2019/RAID_On_Gnulinux_Mdadm_Reference/docs/6.tex View File

@ -0,0 +1,206 @@
\documentclass[11pt]{article}
%Gummi|065|=)
\usepackage{xcolor}
\usepackage[vcentering,dvips]{geometry}
\geometry{papersize={6in,9in},total={4.5in,6.8in}}
\title{\textbf{RAID on GnuLinux - Mdadm Reference}}
\usepackage{graphicx}
\usepackage{caption }
\author{Steak Electronics}
\date{07/31/19}
\begin{document}
%\maketitle
\textcolor{green!60!blue!70}{
\textbf{RAID on GnuLinux - Mdadm Reference}}
%\textbf{Todo}
%\tableofcontents
\textcolor{green!60!blue!70}{
\section{Overview}}
There are a few options for software RAID on Gnu Linux. Among them is BtrFS and ZFS, however today I will focus on using mdadm. This is historically the oldest software raid, therefore should be better vetted, although its performance may be less of that of the first two mentioned - for simple servers, mdadm might be the most stable choice.
\textcolor{green!60!blue!70}{
\section{Details}}
I've worked with this in setting up some Core 2 Duo PCs, with 2 to 4 Sata HDDs. This will be a reference. Let's begin.
\\
\\
\textcolor{green!60!blue!70}{
\subsection{Creation of RAID:}}
Will not be covered here (yet). You must create the partition tables. Create the raid with mdadm. mkfs.ext4 on the raid partition. Add mdadm to grub config. Reinstall grub. Details may be provided later.
\textcolor{green!60!blue!70}{
\subsection{Details of RAID:}}
\begin{verbatim}
root@advacoONE:/dev# sudo mdadm -D /dev/md127
/dev/md127:
Version : 1.2
Creation Time : Fri Feb 1 01:00:25 2019
Raid Level : raid1
Array Size : 57638912 (54.97 GiB 59.02 GB)
Used Dev Size : 57638912 (54.97 GiB 59.02 GB)
Raid Devices : 3
Total Devices : 2
Persistence : Superblock is persistent
Update Time : Fri Feb 1 02:40:44 2019
State : clean, degraded
Active Devices : 2
Working Devices : 2
Failed Devices : 0
Spare Devices : 0
Name : devuan:root
UUID : 83a8dc03:802a4129:26322116:c2cfe1d4
Events : 82
Number Major Minor RaidDevice State
- 0 0 0 removed
1 8 17 1 active sync /dev/sdb1
2 8 33 2 active sync /dev/sdc1
root@advacoONE:/dev#--
\end{verbatim}
so you can see, one was removed (it auto removes, when unplugged)
\\
\\
\textcolor{green!60!blue!70}{
\subsection{Add Drive to RAID:}}
sudo mdadm --add /dev/md127 /dev/sda1
\\
\\
NOTE2: If you setup 2 hdds, in a raid, and want to add a third, if you just --add, it will show up as a spare...
if you do mdadm --grow /dev/md127 -raid-devices=3 then the third might be active sync (what we want)
note that the --grow, seems to allow for parameter changes after you have already created the raid. you can also specify
the exact same command, raid-devices=3 in the setup of the raid (see install doc). Note that if you lose a drive, you can simply add it.
\\
\\
NOTE: don't worry about mkfs.ext4 on the raid members, after initial setup. The RAID will manage that.
\\
\\
NOTE: if you have a new drive and need to copy the hdd partition tables:
https://unix.stackexchange.com/questions/12986/how-to-copy-the-partition-layout-of-a-whole-disk-using-standard-tools
or aka
\begin{verbatim}
(FOR MBR ONLY)
Save:
sfdisk -d /dev/sda > part_table
Restore:
sfdisk /dev/NEWHDD < part_table
(FOR GPT:)
# Save MBR disks
sgdisk --backup=/partitions-backup-$(basename $source).sgdisk $source
sgdisk --backup=/partitions-backup-$(basename $dest).sgdisk $dest
# Copy $source layout to $dest and regenerate GUIDs
sgdisk --replicate=$dest $source
sgdisk -G $dest
\end{verbatim}
\begin{verbatim}
root@advacoONE:/dev# mdadm --add /dev/md127 /dev/sda1
mdadm: added /dev/sda1
root@advacoONE:/dev# sudo mdadm -D /dev/md127
/dev/md127:
Version : 1.2
Creation Time : Fri Feb 1 01:00:25 2019
Raid Level : raid1
Array Size : 57638912 (54.97 GiB 59.02 GB)
Used Dev Size : 57638912 (54.97 GiB 59.02 GB)
Raid Devices : 3
Total Devices : 3
Persistence : Superblock is persistent
Update Time : Fri Feb 1 02:41:43 2019
State : clean, degraded, recovering
Active Devices : 2
Working Devices : 3
Failed Devices : 0
Spare Devices : 1
Rebuild Status : 0% complete
Name : devuan:root
UUID : 83a8dc03:802a4129:26322116:c2cfe1d4
Events : 92
Number Major Minor RaidDevice State
3 8 1 0 spare rebuilding /dev/sda1
1 8 17 1 active sync /dev/sdb1
2 8 33 2 active sync /dev/sdc1
root@advacoONE:/dev#
\end{verbatim}
Looks good.
\begin{verbatim}
Rebuild Status : 6% complete
Name : devuan:root
UUID : 83a8dc03:802a4129:26322116:c2cfe1d4
Events : 103
Number Major Minor RaidDevice State
3 8 1 0 spare rebuilding /dev/sda1
1 8 17 1 active sync /dev/sdb1
2 8 33 2 active sync /dev/sdc1
\end{verbatim}
as it progresses, you see the RAID rebuilding.
\begin{verbatim}
watch -n1 cat /proc/mdstat
Every 1.0s: cat /proc/mdstat
advacoONE: Fri Feb 1 02:43:24 2019
Personalities : [raid1] [linear] [multipath] [raid0] [raid6] [raid5] [raid4] [raid10]
md127 : active raid1 sda1[3] sdb1[1] sdc1[2]
57638912 blocks super 1.2 [3/2] [_UU]
[==>..................] recovery = 11.2% (6471936/57638912) finish=13.2min speed=64324K/sec
unused devices: <none>
\end{verbatim}
\textbf{WARNING:} Reinstall grub on the new drive again as well afterwards.
\textcolor{green!60!blue!70}{
\subsection{Email Notifications on mdadm}}
Test emails on mdadm.. first configure email however you prefer (i currently use ssmtp, see this link:
https://wiki.zoneminder.com/How\_to\_get\_ssmtp\_working\_with\_Zoneminder
--
then edit /etc/mdadm/mdadm.conf to have your email in mailaddr
then
\begin{verbatim}
sudo mdadm --monitor --scan --test --oneshot
\end{verbatim}
should send an email
https://ubuntuforums.org/showthread.php?t=1185134
for more details on email sending
\textcolor{green!60!blue!70}{
\section{References}}
\begin{verbatim}
The section about degraded disks
https://help.ubuntu.com/lts/serverguide/advanced-installation.html.en
General partition tips.
https://github.com/zfsonlinux/zfs/wiki/Debian-Stretch-Root-on-ZFS
SSMTP email setup:
https://wiki.zoneminder.com/How_to_get_ssmtp_working_with_Zoneminder
wiki.zoneminder.com/SMS_Notifications
\end{verbatim}
\end{document}

+ 204
- 0
2019/RAID_On_Gnulinux_Mdadm_Reference/docs/6.tex~ View File

@ -0,0 +1,204 @@
\documentclass[11pt]{article}
%Gummi|065|=)
\usepackage{xcolor}
\usepackage[vcentering,dvips]{geometry}
\geometry{papersize={6in,9in},total={4.5in,6.8in}}
\title{\textbf{RAID on GnuLinux - Mdadm Reference}}
\usepackage{graphicx}
\usepackage{caption }
\author{Steak Electronics}
\date{07/31/19}
\begin{document}
%\maketitle
\textcolor{green!60!blue!70}{
\textbf{RAID on GnuLinux - Mdadm Reference}}
%\textbf{Todo}
%\tableofcontents
\textcolor{green!60!blue!70}{
\section{Overview}}
There are a few options for software RAID on Gnu Linux. Among them is BtrFS and ZFS, however today I will focus on using mdadm. This is historically the oldest software raid, therefore should be better vetted, although its performance may be less of that of the first two mentioned - for simple servers, mdadm might be the most stable choice.
\textcolor{green!60!blue!70}{
\section{Details}}
I've worked with this in setting up some Core 2 Duo PCs, with 2 to 4 Sata HDDs. This will be a reference. Let's begin.
\\
\\
\textcolor{green!60!blue!70}{
\subsection{Creation of RAID:}}
Will not be covered here (yet). You must create the partition tables. Create the raid with mdadm. mkfs.ext4 on the raid partition. Add mdadm to grub config. Reinstall grub. Details may be provided later.
\textcolor{green!60!blue!70}{
\subsection{Details of RAID:}}
\begin{verbatim}
root@advacoONE:/dev# sudo mdadm -D /dev/md127
/dev/md127:
Version : 1.2
Creation Time : Fri Feb 1 01:00:25 2019
Raid Level : raid1
Array Size : 57638912 (54.97 GiB 59.02 GB)
Used Dev Size : 57638912 (54.97 GiB 59.02 GB)
Raid Devices : 3
Total Devices : 2
Persistence : Superblock is persistent
Update Time : Fri Feb 1 02:40:44 2019
State : clean, degraded
Active Devices : 2
Working Devices : 2
Failed Devices : 0
Spare Devices : 0
Name : devuan:root
UUID : 83a8dc03:802a4129:26322116:c2cfe1d4
Events : 82
Number Major Minor RaidDevice State
- 0 0 0 removed
1 8 17 1 active sync /dev/sdb1
2 8 33 2 active sync /dev/sdc1
root@advacoONE:/dev#--
\end{verbatim}
so you can see, one was removed (it auto removes, when unplugged)
\\
\\
\textcolor{green!60!blue!70}{
\subsection{Add Drive to RAID:}}
sudo mdadm --add /dev/md127 /dev/sda1
\\
\\
NOTE2: If you setup 2 hdds, in a raid, and want to add a third, if you just --add, it will show up as a spare...
if you do mdadm --grow /dev/md127 -raid-devices=3 then the third might be active sync (what we want)
note that the --grow, seems to allow for parameter changes after you have already created the raid. you can also specify
the exact same command, raid-devices=3 in the setup of the raid (see install doc). Note that if you lose a drive, you can simply add it.
\\
\\
NOTE: don't worry about mkfs.ext4 on the raid members, after initial setup. The RAID will manage that.
\\
\\
NOTE: if you have a new drive and need to copy the hdd partition tables:
https://unix.stackexchange.com/questions/12986/how-to-copy-the-partition-layout-of-a-whole-disk-using-standard-tools
or aka
\begin{verbatim}
(FOR MBR ONLY)
Save:
sfdisk -d /dev/sda > part_table
Restore:
sfdisk /dev/NEWHDD < part_table
(FOR GPT:)
# Save MBR disks
sgdisk --backup=/partitions-backup-$(basename $source).sgdisk $source
sgdisk --backup=/partitions-backup-$(basename $dest).sgdisk $dest
# Copy $source layout to $dest and regenerate GUIDs
sgdisk --replicate=$dest $source
sgdisk -G $dest
\end{verbatim}
\begin{verbatim}
root@advacoONE:/dev# mdadm --add /dev/md127 /dev/sda1
mdadm: added /dev/sda1
root@advacoONE:/dev# sudo mdadm -D /dev/md127
/dev/md127:
Version : 1.2
Creation Time : Fri Feb 1 01:00:25 2019
Raid Level : raid1
Array Size : 57638912 (54.97 GiB 59.02 GB)
Used Dev Size : 57638912 (54.97 GiB 59.02 GB)
Raid Devices : 3
Total Devices : 3
Persistence : Superblock is persistent
Update Time : Fri Feb 1 02:41:43 2019
State : clean, degraded, recovering
Active Devices : 2
Working Devices : 3
Failed Devices : 0
Spare Devices : 1
Rebuild Status : 0% complete
Name : devuan:root
UUID : 83a8dc03:802a4129:26322116:c2cfe1d4
Events : 92
Number Major Minor RaidDevice State
3 8 1 0 spare rebuilding /dev/sda1
1 8 17 1 active sync /dev/sdb1
2 8 33 2 active sync /dev/sdc1
root@advacoONE:/dev#
\end{verbatim}
Looks good.
\begin{verbatim}
Rebuild Status : 6% complete
Name : devuan:root
UUID : 83a8dc03:802a4129:26322116:c2cfe1d4
Events : 103
Number Major Minor RaidDevice State
3 8 1 0 spare rebuilding /dev/sda1
1 8 17 1 active sync /dev/sdb1
2 8 33 2 active sync /dev/sdc1
\end{verbatim}
as it progresses, you see the RAID rebuilding.
\begin{verbatim}
watch -n1 cat /proc/mdstat
Every 1.0s: cat /proc/mdstat
advacoONE: Fri Feb 1 02:43:24 2019
Personalities : [raid1] [linear] [multipath] [raid0] [raid6] [raid5] [raid4] [raid10]
md127 : active raid1 sda1[3] sdb1[1] sdc1[2]
57638912 blocks super 1.2 [3/2] [_UU]
[==>..................] recovery = 11.2% (6471936/57638912) finish=13.2min speed=64324K/sec
unused devices: <none>
\end{verbatim}
\textbf{WARNING:} Reinstall grub on the new drive again as well afterwards.
\subsection{Email Notifications on mdadm}
Test emails on mdadm.. first configure email however you prefer (i currently use ssmtp, see this link:
https://wiki.zoneminder.com/How\_to\_get\_ssmtp\_working\_with\_Zoneminder
--
then edit /etc/mdadm/mdadm.conf to have your email in mailaddr
then
\begin{verbatim}
sudo mdadm --monitor --scan --test --oneshot
\end{verbatim}
should send an email
https://ubuntuforums.org/showthread.php?t=1185134
for more details on email sending
\textcolor{green!60!blue!70}{
\section{References}}
\begin{verbatim}
The section about degraded disks
https://help.ubuntu.com/lts/serverguide/advanced-installation.html.en
General partition tips.
https://github.com/zfsonlinux/zfs/wiki/Debian-Stretch-Root-on-ZFS
SSMTP email setup:
https://wiki.zoneminder.com/How_to_get_ssmtp_working_with_Zoneminder
wiki.zoneminder.com/SMS_Notifications
\end{verbatim}
\end{document}

BIN
2019/RAID_On_Gnulinux_Mdadm_Reference/docs/fin.pdf View File


+ 12
- 0
2019/Transmission_Primer/docs/10.aux View File

@ -0,0 +1,12 @@
\relax
\@writefile{toc}{\contentsline {section}{\numberline {1}Overview}{1}}
\@writefile{toc}{\contentsline {section}{\numberline {2}Setup Notes}{1}}
\@writefile{toc}{\contentsline {subsection}{\numberline {2.1}Setup Start}{2}}
\@writefile{toc}{\contentsline {section}{\numberline {3}What can go wrong}{2}}
\@writefile{toc}{\contentsline {subsection}{\numberline {3.1}Changing transmission configs}{2}}
\@writefile{toc}{\contentsline {subsection}{\numberline {3.2}/var/lib/transmission/config/settings.json}{2}}
\@writefile{toc}{\contentsline {subsection}{\numberline {3.3}All Bittorrent traffic through Transmission}{3}}
\@writefile{toc}{\contentsline {subsubsection}{\numberline {3.3.1}Block WAN traffic}{3}}
\@writefile{toc}{\contentsline {subsection}{\numberline {3.4}RPC}{3}}
\@writefile{toc}{\contentsline {subsection}{\numberline {3.5}Crashes due to high torrent count}{3}}
\@writefile{toc}{\contentsline {section}{\numberline {4}Conclusion}{4}}

+ 292
- 0
2019/Transmission_Primer/docs/10.log View File

@ -0,0 +1,292 @@
This is pdfTeX, Version 3.14159265-2.6-1.40.17 (TeX Live 2016/Debian) (preloaded format=pdflatex 2019.8.17) 17 JAN 2020 20:40
entering extended mode
restricted \write18 enabled.
%&-line parsing enabled.
**/home/layoutdev/Desktop/code/documentation_general/IT_Articles/2019/Transmiss
ion_Primer/docs/10.tex
(/home/layoutdev/Desktop/code/documentation_general/IT_Articles/2019/Transmissi
on_Primer/docs/10.tex
LaTeX2e <2017/01/01> patch level 3
Babel <3.9r> and hyphenation patterns for 3 language(s) loaded.
(/usr/share/texlive/texmf-dist/tex/latex/base/article.cls
Document Class: article 2014/09/29 v1.4h Standard LaTeX document class
(/usr/share/texlive/texmf-dist/tex/latex/base/size11.clo
File: size11.clo 2014/09/29 v1.4h Standard LaTeX file (size option)
)
\c@part=\count79
\c@section=\count80
\c@subsection=\count81
\c@subsubsection=\count82
\c@paragraph=\count83
\c@subparagraph=\count84
\c@figure=\count85
\c@table=\count86
\abovecaptionskip=\skip41
\belowcaptionskip=\skip42
\bibindent=\dimen102
)
(/usr/share/texlive/texmf-dist/tex/latex/xcolor/xcolor.sty
Package: xcolor 2016/05/11 v2.12 LaTeX color extensions (UK)
(/usr/share/texlive/texmf-dist/tex/latex/graphics-cfg/color.cfg
File: color.cfg 2016/01/02 v1.6 sample color configuration
)
Package xcolor Info: Driver file: pdftex.def on input line 225.
(/usr/share/texlive/texmf-dist/tex/latex/graphics-def/pdftex.def
File: pdftex.def 2017/01/12 v0.06k Graphics/color for pdfTeX
(/usr/share/texlive/texmf-dist/tex/generic/oberdiek/infwarerr.sty
Package: infwarerr 2016/05/16 v1.4 Providing info/warning/error messages (HO)
)
(/usr/share/texlive/texmf-dist/tex/generic/oberdiek/ltxcmds.sty
Package: ltxcmds 2016/05/16 v1.23 LaTeX kernel commands for general use (HO)
)
\Gread@gobject=\count87
)
Package xcolor Info: Model `cmy' substituted by `cmy0' on input line 1348.
Package xcolor Info: Model `hsb' substituted by `rgb' on input line 1352.
Package xcolor Info: Model `RGB' extended on input line 1364.
Package xcolor Info: Model `HTML' substituted by `rgb' on input line 1366.
Package xcolor Info: Model `Hsb' substituted by `hsb' on input line 1367.
Package xcolor Info: Model `tHsb' substituted by `hsb' on input line 1368.
Package xcolor Info: Model `HSB' substituted by `hsb' on input line 1369.
Package xcolor Info: Model `Gray' substituted by `gray' on input line 1370.
Package xcolor Info: Model `wave' substituted by `hsb' on input line 1371.
)
(/usr/share/texlive/texmf-dist/tex/latex/geometry/geometry.sty
Package: geometry 2010/09/12 v5.6 Page Geometry
(/usr/share/texlive/texmf-dist/tex/latex/graphics/keyval.sty
Package: keyval 2014/10/28 v1.15 key=value parser (DPC)
\KV@toks@=\toks14
)
(/usr/share/texlive/texmf-dist/tex/generic/oberdiek/ifpdf.sty
Package: ifpdf 2016/05/14 v3.1 Provides the ifpdf switch
)
(/usr/share/texlive/texmf-dist/tex/generic/oberdiek/ifvtex.sty
Package: ifvtex 2016/05/16 v1.6 Detect VTeX and its facilities (HO)
Package ifvtex Info: VTeX not detected.
)
(/usr/share/texlive/texmf-dist/tex/generic/ifxetex/ifxetex.sty
Package: ifxetex 2010/09/12 v0.6 Provides ifxetex conditional
)
\Gm@cnth=\count88
\Gm@cntv=\count89
\c@Gm@tempcnt=\count90
\Gm@bindingoffset=\dimen103
\Gm@wd@mp=\dimen104
\Gm@odd@mp=\dimen105
\Gm@even@mp=\dimen106
\Gm@layoutwidth=\dimen107
\Gm@layoutheight=\dimen108
\Gm@layouthoffset=\dimen109
\Gm@layoutvoffset=\dimen110
\Gm@dimlist=\toks15
)
(/usr/share/texlive/texmf-dist/tex/latex/graphics/graphicx.sty
Package: graphicx 2014/10/28 v1.0g Enhanced LaTeX Graphics (DPC,SPQR)
(/usr/share/texlive/texmf-dist/tex/latex/graphics/graphics.sty
Package: graphics 2016/10/09 v1.0u Standard LaTeX Graphics (DPC,SPQR)
(/usr/share/texlive/texmf-dist/tex/latex/graphics/trig.sty
Package: trig 2016/01/03 v1.10 sin cos tan (DPC)
)
(/usr/share/texlive/texmf-dist/tex/latex/graphics-cfg/graphics.cfg
File: graphics.cfg 2016/06/04 v1.11 sample graphics configuration
)
Package graphics Info: Driver file: pdftex.def on input line 99.
)
\Gin@req@height=\dimen111
\Gin@req@width=\dimen112
)
(/usr/share/texlive/texmf-dist/tex/latex/caption/caption.sty
Package: caption 2016/02/21 v3.3-144 Customizing captions (AR)
(/usr/share/texlive/texmf-dist/tex/latex/caption/caption3.sty
Package: caption3 2016/05/22 v1.7-166 caption3 kernel (AR)
Package caption3 Info: TeX engine: e-TeX on input line 67.
\captionmargin=\dimen113
\captionmargin@=\dimen114
\captionwidth=\dimen115
\caption@tempdima=\dimen116
\caption@indent=\dimen117
\caption@parindent=\dimen118
\caption@hangindent=\dimen119
)
\c@ContinuedFloat=\count91
) (./10.aux)
\openout1 = `10.aux'.
LaTeX Font Info: Checking defaults for OML/cmm/m/it on input line 11.
LaTeX Font Info: ... okay on input line 11.
LaTeX Font Info: Checking defaults for T1/cmr/m/n on input line 11.
LaTeX Font Info: ... okay on input line 11.
LaTeX Font Info: Checking defaults for OT1/cmr/m/n on input line 11.
LaTeX Font Info: ... okay on input line 11.
LaTeX Font Info: Checking defaults for OMS/cmsy/m/n on input line 11.
LaTeX Font Info: ... okay on input line 11.
LaTeX Font Info: Checking defaults for OMX/cmex/m/n on input line 11.
LaTeX Font Info: ... okay on input line 11.
LaTeX Font Info: Checking defaults for U/cmr/m/n on input line 11.
LaTeX Font Info: ... okay on input line 11.
(/usr/share/texlive/texmf-dist/tex/context/base/mkii/supp-pdf.mkii
[Loading MPS to PDF converter (version 2006.09.02).]
\scratchcounter=\count92
\scratchdimen=\dimen120
\scratchbox=\box26
\nofMPsegments=\count93
\nofMParguments=\count94
\everyMPshowfont=\toks16
\MPscratchCnt=\count95
\MPscratchDim=\dimen121
\MPnumerator=\count96
\makeMPintoPDFobject=\count97
\everyMPtoPDFconversion=\toks17
) (/usr/share/texlive/texmf-dist/tex/generic/oberdiek/pdftexcmds.sty
Package: pdftexcmds 2016/05/21 v0.22 Utility functions of pdfTeX for LuaTeX (HO
)
(/usr/share/texlive/texmf-dist/tex/generic/oberdiek/ifluatex.sty
Package: ifluatex 2016/05/16 v1.4 Provides the ifluatex switch (HO)
Package ifluatex Info: LuaTeX not detected.
)
Package pdftexcmds Info: LuaTeX not detected.
Package pdftexcmds Info: \pdf@primitive is available.
Package pdftexcmds Info: \pdf@ifprimitive is available.
Package pdftexcmds Info: \pdfdraftmode found.
)
(/usr/share/texlive/texmf-dist/tex/latex/oberdiek/epstopdf-base.sty
Package: epstopdf-base 2016/05/15 v2.6 Base part for package epstopdf
(/usr/share/texlive/texmf-dist/tex/latex/oberdiek/grfext.sty
Package: grfext 2016/05/16 v1.2 Manage graphics extensions (HO)
(/usr/share/texlive/texmf-dist/tex/generic/oberdiek/kvdefinekeys.sty
Package: kvdefinekeys 2016/05/16 v1.4 Define keys (HO)
))
(/usr/share/texlive/texmf-dist/tex/latex/oberdiek/kvoptions.sty
Package: kvoptions 2016/05/16 v3.12 Key value format for package options (HO)
(/usr/share/texlive/texmf-dist/tex/generic/oberdiek/kvsetkeys.sty
Package: kvsetkeys 2016/05/16 v1.17 Key value parser (HO)
(/usr/share/texlive/texmf-dist/tex/generic/oberdiek/etexcmds.sty
Package: etexcmds 2016/05/16 v1.6 Avoid name clashes with e-TeX commands (HO)
Package etexcmds Info: Could not find \expanded.
(etexcmds) That can mean that you are not using pdfTeX 1.50 or
(etexcmds) that some package has redefined \expanded.
(etexcmds) In the latter case, load this package earlier.
)))
Package epstopdf-base Info: Redefining graphics rule for `.eps' on input line 4
38.
Package grfext Info: Graphics extension search list:
(grfext) [.png,.pdf,.jpg,.mps,.jpeg,.jbig2,.jb2,.PNG,.PDF,.JPG,.JPE
G,.JBIG2,.JB2,.eps]
(grfext) \AppendGraphicsExtensions on input line 456.
(/usr/share/texlive/texmf-dist/tex/latex/latexconfig/epstopdf-sys.cfg
File: epstopdf-sys.cfg 2010/07/13 v1.3 Configuration of (r)epstopdf for TeX Liv
e
))
*geometry* detected driver: dvips
*geometry* verbose mode - [ preamble ] result:
* driver: dvips
* paper: custom
* layout: <same size as paper>
* layoutoffset:(h,v)=(0.0pt,0.0pt)
* vratio: 1:1
* modes:
* h-part:(L,W,R)=(54.2025pt, 325.215pt, 54.2025pt)
* v-part:(T,H,B)=(79.49689pt, 491.43622pt, 79.49689pt)
* \paperwidth=433.62pt
* \paperheight=650.43pt
* \textwidth=325.215pt
* \textheight=491.43622pt
* \oddsidemargin=-18.06749pt
* \evensidemargin=-18.06749pt
* \topmargin=-29.7731pt
* \headheight=12.0pt
* \headsep=25.0pt
* \topskip=11.0pt
* \footskip=30.0pt
* \marginparwidth=59.0pt
* \marginparsep=10.0pt
* \columnsep=10.0pt
* \skip\footins=10.0pt plus 4.0pt minus 2.0pt
* \hoffset=0.0pt
* \voffset=0.0pt
* \mag=1000
* \@twocolumnfalse
* \@twosidefalse
* \@mparswitchfalse
* \@reversemarginfalse
* (1in=72.27pt=25.4mm, 1cm=28.453pt)
Package caption Info: Begin \AtBeginDocument code.
Package caption Info: End \AtBeginDocument code.
(./10.toc
LaTeX Font Info: External font `cmex10' loaded for size
(Font) <10.95> on input line 3.
LaTeX Font Info: External font `cmex10' loaded for size
(Font) <8> on input line 3.
LaTeX Font Info: External font `cmex10' loaded for size
(Font) <6> on input line 3.
)
\tf@toc=\write3
\openout3 = `10.toc'.
Overfull \hbox (8.75026pt too wide) in paragraph at lines 27--28
\OT1/cmr/m/n/10.95 transmission-daemon. There is transmission-remote, and trans
mission-
[]
[1
Non-PDF special ignored!
{/var/lib/texmf/fonts/map/pdftex/updmap/pdftex.map}]
Overfull \hbox (19.70627pt too wide) in paragraph at lines 46--46
[]\OT1/cmtt/m/n/10.95 iptables -t nat -I PREROUTING -i eth0 -p tcp --dport 5200
0 \[]
[]
Overfull \hbox (19.70627pt too wide) in paragraph at lines 46--46
[]\OT1/cmtt/m/n/10.95 iptables -t nat -I PREROUTING -i eth0 -p udp --dport 5200
0 \[]
[]
[2] [3]
LaTeX Font Info: Try loading font information for OMS+cmr on input line 114.
(/usr/share/texlive/texmf-dist/tex/latex/base/omscmr.fd
File: omscmr.fd 2014/09/29 v2.5h Standard LaTeX font definitions
)
LaTeX Font Info: Font shape `OMS/cmr/m/n' in size <10.95> not available
(Font) Font shape `OMS/cmsy/m/n' tried instead on input line 114.
[4] (./10.aux) )
Here is how much of TeX's memory you used:
3524 strings out of 494945
53499 string characters out of 6181032
122327 words of memory out of 5000000
6799 multiletter control sequences out of 15000+600000
8411 words of font info for 30 fonts, out of 8000000 for 9000
14 hyphenation exceptions out of 8191
39i,6n,38p,558b,204s stack positions out of 5000i,500n,10000p,200000b,80000s
</usr/share/texlive/texmf-dist/fonts/type1/public/amsfonts/cm/
cmbx10.pfb></usr/share/texlive/texmf-dist/fonts/type1/public/amsfonts/cm/cmbx12
.pfb></usr/share/texlive/texmf-dist/fonts/type1/public/amsfonts/cm/cmr10.pfb></
usr/share/texlive/texmf-dist/fonts/type1/public/amsfonts/cm/cmsy10.pfb></usr/sh
are/texlive/texmf-dist/fonts/type1/public/amsfonts/cm/cmti10.pfb></usr/share/te
xlive/texmf-dist/fonts/type1/public/amsfonts/cm/cmtt10.pfb>
Output written on 10.pdf (4 pages, 94832 bytes).
PDF statistics:
41 PDF objects out of 1000 (max. 8388607)
28 compressed objects within 1 object stream
0 named destinations out of 1000 (max. 500000)
1 words of extra memory for PDF output out of 10000 (max. 10000000)

BIN
2019/Transmission_Primer/docs/10.pdf View File


+ 122
- 0
2019/Transmission_Primer/docs/10.tex View File

@ -0,0 +1,122 @@
\documentclass[11pt]{article}
%Gummi|065|=)
\usepackage{xcolor}
\usepackage[vcentering,dvips]{geometry}
\geometry{papersize={6in,9in},total={4.5in,6.8in}}
\title{\textbf{Transmission Torrent Setup Notes}}
\usepackage{graphicx}
\usepackage{caption }
\author{Steak Electronics}
\date{2019}
\begin{document}
%\maketitle
\textbf{Transmission Bittorrent Primer}
\vspace{0.2in}
\emph{``Whomsoever diggeth a pit, shall fall in it'' - Marley,B.}
\emph{(You reap what you sow)}
\tableofcontents
\textcolor{green!60!blue!70}{
\section{Overview}}
Transmission is a Bittorrent server that can be deployed on a computer or dedicated seedbox. It's installable with apt-get install transmission-daemon. There is transmission-remote, and transmission-remote-gtk to view the torrents over the LAN.
\textcolor{green!60!blue!70}{
\section{Setup Notes}}
I setup transmission behind a VPN, and forward ports appropriately. In order to do this, I have an outbound VPN from my LAN that goes to a remote server, then the ports for transmission are open on the remote server.
\textcolor{green!60!blue!70}{
\subsection{Setup Start}}
Install openvpn road warrior from Nyr on github. This is deployed on the remote VPS. Create a client certificate and install that on the LAN seedbox.
\vspace{0.2in}
On server you need to forward ports:
\begin{verbatim}
iptables -t nat -I PREROUTING -i eth0 -p tcp --dport 52000 \
-j DNAT --to-destination 10.8.0.2:52000
iptables -t nat -I PREROUTING -i eth0 -p udp --dport 52000 \
-j DNAT --to-destination 10.8.0.2:52000
\end{verbatim}
In fact, you probably only need one, but here we are opening TCP and UDP. This example assumes you are using the default transmission ports. It's advised to change the default ports.
On transmission daemon client, you don't need anything (for iptables). The remote VPN server does all firewall routing.
Test that the port is open in Transmision remote gtk's settings. If it's not, diagnose with tcpdump.
\textcolor{green!60!blue!70}{
\section{What can go wrong}}
\textcolor{green!60!blue!70}{
\subsection{Changing transmission configs}}
In order to change any settings.json of transmission, you must stop transmission. Otherwise, the running program will overwrite / ignore your changes.
\textcolor{green!60!blue!70}{
\subsection{/var/lib/transmission/config/settings.json}}
Make sure peer port is 52000, or whatever you set it to.
Disable random peer port (shouldn't be enabled by default).
\vspace{0.2in}
make sure bind-address ipv4 has your vpn address, or make it 0.0.0.0.
If you have it to a previous or incorrect ipv4 address, it will look like * (for all ports) in your \# netstat -ano , but it just won't work. \textbf{TRAP}
\vspace{0.2in}
\textcolor{green!60!blue!70}{
\subsection{All Bittorrent traffic through Transmission}}
If your vpn for all the traffic is working correctly when you examine ifconfig you will see the packet numbers for eth0 and tun0 be comparable in numbers.
if it seems like eth0 is moving more packets than tun0, your tunnel is not working
the torrent client is leaking.
Verify it by doing either a netstat or more helpfully a tcpdump for the local interface
\textcolor{green!60!blue!70}{
\subsubsection{Block WAN traffic}}
You can block the WAN traffic that isn't from the VPN to the transmission daemon at the router.
So wan - no vpn - router - seedbox -- BLOCK
and on top of that (insert for iptables, not append)
Wan - yes vpn - router - seedbox -- ALLOW
\textcolor{green!60!blue!70}{
\subsection{RPC}}
RPC on transmission. This is the protocol that you can access transmission through from another machine.
\textbf{Problem:}
Only works through http. If you want it on a VPS, you have a problem (It's not encrypted and passwords are in plain text). There's no way to access the Seedbox remotely (securely).
\textbf{Solution:}
Use it through a VPN tunnel. e.g. Transmission-remote-gui.
Force binding of RPC to be only the TUN IP address as well. This way RPC is not accessible from WAN.
\textcolor{green!60!blue!70}{
\subsection{Crashes due to high torrent count}}
I've used a Beaglebone with transmission, and eventually (after about 400 torrents) found instability. Transmission-daemon would crash. Instead, I moved onto x86 hardware, and the problems have mostly gone away. It's possible to tune transmission to connect to less peers, or have less torrents active if you are having stability problems. This lowers your seeding ability, but brings stability back. Ideally, you should use server motherboards / hardware.
Another thing to consider is the SATA controller for your HD. If you are using a NAS, or external USB enclosure, there can be some controllers which perform more reliably.
\textcolor{green!60!blue!70}{
\section{Conclusion}}
Basically:
\begin{itemize}
\item install nyr on server, then make cert for client and setup
\item server, add two prerouting commands (just these two!)
\item client, double check transmission settings.json if necessary.
\item client, watch /var/log/transmission/, and verify the port is open via transmission-remote-gtk
\end{itemize}
\end{document}

+ 11
- 0
2019/Transmission_Primer/docs/10.toc View File

@ -0,0 +1,11 @@
\contentsline {section}{\numberline {1}Overview}{1}
\contentsline {section}{\numberline {2}Setup Notes}{1}
\contentsline {subsection}{\numberline {2.1}Setup Start}{2}
\contentsline {section}{\numberline {3}What can go wrong}{2}
\contentsline {subsection}{\numberline {3.1}Changing transmission configs}{2}
\contentsline {subsection}{\numberline {3.2}/var/lib/transmission/config/settings.json}{2}
\contentsline {subsection}{\numberline {3.3}All Bittorrent traffic through Transmission}{3}
\contentsline {subsubsection}{\numberline {3.3.1}Block WAN traffic}{3}
\contentsline {subsection}{\numberline {3.4}RPC}{3}
\contentsline {subsection}{\numberline {3.5}Crashes due to high torrent count}{3}
\contentsline {section}{\numberline {4}Conclusion}{4}

+ 12
- 0
2019/Transmission_Primer/docs/11.aux View File

@ -0,0 +1,12 @@
\relax
\@writefile{toc}{\contentsline {section}{\numberline {1}Overview}{1}}
\@writefile{toc}{\contentsline {section}{\numberline {2}Setup Notes}{1}}
\@writefile{toc}{\contentsline {subsection}{\numberline {2.1}Setup Start}{2}}
\@writefile{toc}{\contentsline {section}{\numberline {3}What can go wrong}{2}}
\@writefile{toc}{\contentsline {subsection}{\numberline {3.1}Changing transmission configs}{2}}
\@writefile{toc}{\contentsline {subsection}{\numberline {3.2}/var/lib/transmission/config/settings.json}{2}}
\@writefile{toc}{\contentsline {subsection}{\numberline {3.3}All Bittorrent traffic through Transmission}{3}}
\@writefile{toc}{\contentsline {subsubsection}{\numberline {3.3.1}Block WAN traffic}{3}}
\@writefile{toc}{\contentsline {subsection}{\numberline {3.4}RPC}{3}}
\@writefile{toc}{\contentsline {subsection}{\numberline {3.5}Crashes due to high torrent count}{3}}
\@writefile{toc}{\contentsline {section}{\numberline {4}Conclusion}{4}}

+ 300
- 0
2019/Transmission_Primer/docs/11.log View File

@ -0,0 +1,300 @@
This is pdfTeX, Version 3.14159265-2.6-1.40.17 (TeX Live 2016/Debian) (preloaded format=pdflatex 2019.8.17) 16 FEB 2020 23:14
entering extended mode
restricted \write18 enabled.
%&-line parsing enabled.
**/home/layoutdev/Desktop/code/documentation_general/IT_Articles/2019/Transmiss
ion_Primer/docs/11.tex
(/home/layoutdev/Desktop/code/documentation_general/IT_Articles/2019/Transmissi
on_Primer/docs/11.tex
LaTeX2e <2017/01/01> patch level 3
Babel <3.9r> and hyphenation patterns for 3 language(s) loaded.
(/usr/share/texlive/texmf-dist/tex/latex/base/article.cls
Document Class: article 2014/09/29 v1.4h Standard LaTeX document class
(/usr/share/texlive/texmf-dist/tex/latex/base/size11.clo
File: size11.clo 2014/09/29 v1.4h Standard LaTeX file (size option)
)
\c@part=\count79
\c@section=\count80
\c@subsection=\count81
\c@subsubsection=\count82
\c@paragraph=\count83
\c@subparagraph=\count84
\c@figure=\count85
\c@table=\count86
\abovecaptionskip=\skip41
\belowcaptionskip=\skip42
\bibindent=\dimen102
)
(/usr/share/texlive/texmf-dist/tex/latex/xcolor/xcolor.sty
Package: xcolor 2016/05/11 v2.12 LaTeX color extensions (UK)
(/usr/share/texlive/texmf-dist/tex/latex/graphics-cfg/color.cfg
File: color.cfg 2016/01/02 v1.6 sample color configuration
)
Package xcolor Info: Driver file: pdftex.def on input line 225.
(/usr/share/texlive/texmf-dist/tex/latex/graphics-def/pdftex.def
File: pdftex.def 2017/01/12 v0.06k Graphics/color for pdfTeX
(/usr/share/texlive/texmf-dist/tex/generic/oberdiek/infwarerr.sty
Package: infwarerr 2016/05/16 v1.4 Providing info/warning/error messages (HO)
)
(/usr/share/texlive/texmf-dist/tex/generic/oberdiek/ltxcmds.sty
Package: ltxcmds 2016/05/16 v1.23 LaTeX kernel commands for general use (HO)
)
\Gread@gobject=\count87
)
Package xcolor Info: Model `cmy' substituted by `cmy0' on input line 1348.
Package xcolor Info: Model `hsb' substituted by `rgb' on input line 1352.
Package xcolor Info: Model `RGB' extended on input line 1364.
Package xcolor Info: Model `HTML' substituted by `rgb' on input line 1366.
Package xcolor Info: Model `Hsb' substituted by `hsb' on input line 1367.
Package xcolor Info: Model `tHsb' substituted by `hsb' on input line 1368.
Package xcolor Info: Model `HSB' substituted by `hsb' on input line 1369.
Package xcolor Info: Model `Gray' substituted by `gray' on input line 1370.
Package xcolor Info: Model `wave' substituted by `hsb' on input line 1371.
)
(/usr/share/texlive/texmf-dist/tex/latex/geometry/geometry.sty
Package: geometry 2010/09/12 v5.6 Page Geometry
(/usr/share/texlive/texmf-dist/tex/latex/graphics/keyval.sty
Package: keyval 2014/10/28 v1.15 key=value parser (DPC)
\KV@toks@=\toks14
)
(/usr/share/texlive/texmf-dist/tex/generic/oberdiek/ifpdf.sty
Package: ifpdf 2016/05/14 v3.1 Provides the ifpdf switch
)
(/usr/share/texlive/texmf-dist/tex/generic/oberdiek/ifvtex.sty
Package: ifvtex 2016/05/16 v1.6 Detect VTeX and its facilities (HO)
Package ifvtex Info: VTeX not detected.
)
(/usr/share/texlive/texmf-dist/tex/generic/ifxetex/ifxetex.sty
Package: ifxetex 2010/09/12 v0.6 Provides ifxetex conditional
)
\Gm@cnth=\count88
\Gm@cntv=\count89
\c@Gm@tempcnt=\count90
\Gm@bindingoffset=\dimen103
\Gm@wd@mp=\dimen104
\Gm@odd@mp=\dimen105
\Gm@even@mp=\dimen106
\Gm@layoutwidth=\dimen107
\Gm@layoutheight=\dimen108
\Gm@layouthoffset=\dimen109
\Gm@layoutvoffset=\dimen110
\Gm@dimlist=\toks15
)
(/usr/share/texlive/texmf-dist/tex/latex/graphics/graphicx.sty
Package: graphicx 2014/10/28 v1.0g Enhanced LaTeX Graphics (DPC,SPQR)
(/usr/share/texlive/texmf-dist/tex/latex/graphics/graphics.sty
Package: graphics 2016/10/09 v1.0u Standard LaTeX Graphics (DPC,SPQR)
(/usr/share/texlive/texmf-dist/tex/latex/graphics/trig.sty
Package: trig 2016/01/03 v1.10 sin cos tan (DPC)
)
(/usr/share/texlive/texmf-dist/tex/latex/graphics-cfg/graphics.cfg
File: graphics.cfg 2016/06/04 v1.11 sample graphics configuration
)
Package graphics Info: Driver file: pdftex.def on input line 99.
)
\Gin@req@height=\dimen111
\Gin@req@width=\dimen112
)
(/usr/share/texlive/texmf-dist/tex/latex/caption/caption.sty
Package: caption 2016/02/21 v3.3-144 Customizing captions (AR)
(/usr/share/texlive/texmf-dist/tex/latex/caption/caption3.sty
Package: caption3 2016/05/22 v1.7-166 caption3 kernel (AR)
Package caption3 Info: TeX engine: e-TeX on input line 67.
\captionmargin=\dimen113
\captionmargin@=\dimen114
\captionwidth=\dimen115
\caption@tempdima=\dimen116
\caption@indent=\dimen117
\caption@parindent=\dimen118
\caption@hangindent=\dimen119
)
\c@ContinuedFloat=\count91
) (./11.aux)
\openout1 = `11.aux'.
LaTeX Font Info: Checking defaults for OML/cmm/m/it on input line 11.
LaTeX Font Info: ... okay on input line 11.
LaTeX Font Info: Checking defaults for T1/cmr/m/n on input line 11.
LaTeX Font Info: ... okay on input line 11.
LaTeX Font Info: Checking defaults for OT1/cmr/m/n on input line 11.
LaTeX Font Info: ... okay on input line 11.
LaTeX Font Info: Checking defaults for OMS/cmsy/m/n on input line 11.
LaTeX Font Info: ... okay on input line 11.
LaTeX Font Info: Checking defaults for OMX/cmex/m/n on input line 11.
LaTeX Font Info: ... okay on input line 11.
LaTeX Font Info: Checking defaults for U/cmr/m/n on input line 11.
LaTeX Font Info: ... okay on input line 11.
(/usr/share/texlive/texmf-dist/tex/context/base/mkii/supp-pdf.mkii
[Loading MPS to PDF converter (version 2006.09.02).]
\scratchcounter=\count92
\scratchdimen=\dimen120
\scratchbox=\box26
\nofMPsegments=\count93
\nofMParguments=\count94
\everyMPshowfont=\toks16
\MPscratchCnt=\count95
\MPscratchDim=\dimen121
\MPnumerator=\count96
\makeMPintoPDFobject=\count97
\everyMPtoPDFconversion=\toks17
) (/usr/share/texlive/texmf-dist/tex/generic/oberdiek/pdftexcmds.sty
Package: pdftexcmds 2016/05/21 v0.22 Utility functions of pdfTeX for LuaTeX (HO
)
(/usr/share/texlive/texmf-dist/tex/generic/oberdiek/ifluatex.sty
Package: ifluatex 2016/05/16 v1.4 Provides the ifluatex switch (HO)
Package ifluatex Info: LuaTeX not detected.
)
Package pdftexcmds Info: LuaTeX not detected.
Package pdftexcmds Info: \pdf@primitive is available.
Package pdftexcmds Info: \pdf@ifprimitive is available.
Package pdftexcmds Info: \pdfdraftmode found.
)
(/usr/share/texlive/texmf-dist/tex/latex/oberdiek/epstopdf-base.sty
Package: epstopdf-base 2016/05/15 v2.6 Base part for package epstopdf
(/usr/share/texlive/texmf-dist/tex/latex/oberdiek/grfext.sty
Package: grfext 2016/05/16 v1.2 Manage graphics extensions (HO)
(/usr/share/texlive/texmf-dist/tex/generic/oberdiek/kvdefinekeys.sty
Package: kvdefinekeys 2016/05/16 v1.4 Define keys (HO)
))
(/usr/share/texlive/texmf-dist/tex/latex/oberdiek/kvoptions.sty
Package: kvoptions 2016/05/16 v3.12 Key value format for package options (HO)
(/usr/share/texlive/texmf-dist/tex/generic/oberdiek/kvsetkeys.sty
Package: kvsetkeys 2016/05/16 v1.17 Key value parser (HO)
(/usr/share/texlive/texmf-dist/tex/generic/oberdiek/etexcmds.sty
Package: etexcmds 2016/05/16 v1.6 Avoid name clashes with e-TeX commands (HO)
Package etexcmds Info: Could not find \expanded.
(etexcmds) That can mean that you are not using pdfTeX 1.50 or
(etexcmds) that some package has redefined \expanded.
(etexcmds) In the latter case, load this package earlier.
)))
Package epstopdf-base Info: Redefining graphics rule for `.eps' on input line 4
38.
Package grfext Info: Graphics extension search list:
(grfext) [.png,.pdf,.jpg,.mps,.jpeg,.jbig2,.jb2,.PNG,.PDF,.JPG,.JPE
G,.JBIG2,.JB2,.eps]
(grfext) \AppendGraphicsExtensions on input line 456.
(/usr/share/texlive/texmf-dist/tex/latex/latexconfig/epstopdf-sys.cfg
File: epstopdf-sys.cfg 2010/07/13 v1.3 Configuration of (r)epstopdf for TeX Liv
e
))
*geometry* detected driver: dvips
*geometry* verbose mode - [ preamble ] result:
* driver: dvips
* paper: custom
* layout: <same size as paper>
* layoutoffset:(h,v)=(0.0pt,0.0pt)
* vratio: 1:1
* modes:
* h-part:(L,W,R)=(54.2025pt, 325.215pt, 54.2025pt)
* v-part:(T,H,B)=(79.49689pt, 491.43622pt, 79.49689pt)
* \paperwidth=433.62pt
* \paperheight=650.43pt
* \textwidth=325.215pt
* \textheight=491.43622pt
* \oddsidemargin=-18.06749pt
* \evensidemargin=-18.06749pt
* \topmargin=-29.7731pt
* \headheight=12.0pt
* \headsep=25.0pt
* \topskip=11.0pt
* \footskip=30.0pt
* \marginparwidth=59.0pt
* \marginparsep=10.0pt
* \columnsep=10.0pt
* \skip\footins=10.0pt plus 4.0pt minus 2.0pt
* \hoffset=0.0pt
* \voffset=0.0pt
* \mag=1000
* \@twocolumnfalse
* \@twosidefalse
* \@mparswitchfalse
* \@reversemarginfalse
* (1in=72.27pt=25.4mm, 1cm=28.453pt)
Package caption Info: Begin \AtBeginDocument code.
Package caption Info: End \AtBeginDocument code.
(./11.toc
LaTeX Font Info: External font `cmex10' loaded for size
(Font) <10.95> on input line 3.
LaTeX Font Info: External font `cmex10' loaded for size
(Font) <8> on input line 3.
LaTeX Font Info: External font `cmex10' loaded for size
(Font) <6> on input line 3.
)
\tf@toc=\write3
\openout3 = `11.toc'.
Overfull \hbox (8.75026pt too wide) in paragraph at lines 27--28
\OT1/cmr/m/n/10.95 transmission-daemon. There is transmission-remote, and trans
mission-
[]
[1
Non-PDF special ignored!
{/var/lib/texmf/fonts/map/pdftex/updmap/pdftex.map}]
Overfull \hbox (19.70627pt too wide) in paragraph at lines 46--46
[]\OT1/cmtt/m/n/10.95 iptables -t nat -I PREROUTING -i eth0 -p tcp --dport 5200
0 \[]
[]
Overfull \hbox (19.70627pt too wide) in paragraph at lines 46--46
[]\OT1/cmtt/m/n/10.95 iptables -t nat -I PREROUTING -i eth0 -p udp --dport 5200
0 \[]
[]
[2]
LaTeX Font Info: External font `cmex10' loaded for size
(Font) <9> on input line 104.
LaTeX Font Info: External font `cmex10' loaded for size
(Font) <5> on input line 104.
[3]
LaTeX Font Info: Try loading font information for OMS+cmr on input line 114.
(/usr/share/texlive/texmf-dist/tex/latex/base/omscmr.fd
File: omscmr.fd 2014/09/29 v2.5h Standard LaTeX font definitions
)
LaTeX Font Info: Font shape `OMS/cmr/m/n' in size <10.95> not available
(Font) Font shape `OMS/cmsy/m/n' tried instead on input line 114.
[4] (./11.aux) )
Here is how much of TeX's memory you used:
3532 strings out of 494945
53582 string characters out of 6181032
123327 words of memory out of 5000000
6804 multiletter control sequences out of 15000+600000
9323 words of font info for 33 fonts, out of 8000000 for 9000
14 hyphenation exceptions out of 8191
39i,8n,38p,688b,204s stack positions out of 5000i,500n,10000p,200000b,80000s
</usr/share/texlive/texmf-dist/fonts/type1/public/amsfonts/cm/
cmbx10.pfb></usr/share/texlive/texmf-dist/fonts/type1/public/amsfonts/cm/cmbx12
.pfb></usr/share/texlive/texmf-dist/fonts/type1/public/amsfonts/cm/cmr10.pfb></
usr/share/texlive/texmf-dist/fonts/type1/public/amsfonts/cm/cmr6.pfb></usr/shar
e/texlive/texmf-dist/fonts/type1/public/amsfonts/cm/cmr8.pfb></usr/share/texliv
e/texmf-dist/fonts/type1/public/amsfonts/cm/cmr9.pfb></usr/share/texlive/texmf-
dist/fonts/type1/public/amsfonts/cm/cmsy10.pfb></usr/share/texlive/texmf-dist/f
onts/type1/public/amsfonts/cm/cmti10.pfb></usr/share/texlive/texmf-dist/fonts/t
ype1/public/amsfonts/cm/cmtt10.pfb>
Output written on 11.pdf (4 pages, 122027 bytes).
PDF statistics:
53 PDF objects out of 1000 (max. 8388607)
37 compressed objects within 1 object stream
0 named destinations out of 1000 (max. 500000)
1 words of extra memory for PDF output out of 10000 (max. 10000000)

Some files were not shown because too many files changed in this diff

Loading…
Cancel
Save