[{"content":"I\u0026rsquo;ve been using Claude Code daily for months now. It writes most of my code, documentation, commit messages, PR descriptions. The code is great. The prose, not so much.\nNot because it\u0026rsquo;s bad writing, it\u0026rsquo;s perfectly competent. The problem is it sounds like AI. Every PR description comes out with \u0026ldquo;This PR implements\u0026hellip;\u0026rdquo; and \u0026ldquo;Additionally\u0026hellip;\u0026rdquo; and perfect parallel structure across all bullet points. It\u0026rsquo;s polished in a way that I\u0026rsquo;m not, and that\u0026rsquo;s exactly what makes it obvious.\nI wanted to fix this. Not to deceive anyone, just so the text Claude generates actually sounds like something I\u0026rsquo;d write, saving me from rewriting everything by hand.\nThe approach Claude Code has an output styles feature where you can provide a markdown file that guides how it writes prose. Most examples I\u0026rsquo;ve seen are pretty generic though, stuff like \u0026ldquo;be concise\u0026rdquo; and \u0026ldquo;use technical language\u0026rdquo;. These don\u0026rsquo;t capture what makes a specific person\u0026rsquo;s writing theirs.\nSo I took a different approach. I collected about 140,000 words of my own writing from GitHub and Reddit, ran quantitative linguistic analysis on the corpus, then did qualitative pattern extraction with Claude itself. The result is a style guide grounded in actual data from my writing, not vibes.\nI\u0026rsquo;m describing this as a personal writing style project, but the same process works for any style target. If you need Claude to match your company\u0026rsquo;s formal documentation tone, or write in the style of a specific regulatory framework, you\u0026rsquo;d just start with the appropriate source material instead of personal writing samples. Feed it your existing enterprise docs, your team\u0026rsquo;s technical standards, whatever you want it to emulate, and the analysis pipeline works the same way.\nCollecting samples I pulled from two main sources:\nGitHub - 58 PRs and 11 issues from 2024, mostly MicroPython ecosystem contributions. Collected using the gh CLI, one text file per PR/issue with description and all comments. This gave me my \u0026ldquo;technical register\u0026rdquo; - how I write when I\u0026rsquo;m being precise about code.\nReddit - Full account export using rexport (a PRAW wrapper). This dumped about 25MB of JSON covering years of comments and posts. The reddit data is where the casual voice lives - opinions, troubleshooting help, project announcements, random conversations about coffee and cars.\nThe two sources together are important. Technical writing on its own would give a one-dimensional picture. The reddit data captures how I actually talk when I\u0026rsquo;m not being careful about it, which is where most of the distinctive patterns come from.\nWhat the analysis found I ran a Python script (standard library only, no NLP packages needed) that produces quantitative metrics across the full corpus. A couple of the interesting numbers:\nCorpus size: 140,772 words, 7,178 sentences, 1,828 paragraphs Avg sentence length: 19.6 words (median: 18.0) Contraction rate: 3.36% of words Passive voice: 8.7% of sentences Flesch Reading Ease: 64.2 (Standard, ~9th grade) The punctuation analysis was particularly revealing:\nPunctuation Count Per 1000 words slashes (/) 6299 44.7 commas (,) 5412 38.4 semicolons (;) 132 0.9 em-dashes (--) 15 0.1 I use slashes at 44x the rate I use semicolons. I basically never use emdashes. These aren\u0026rsquo;t things I\u0026rsquo;d have thought to put in a style guide manually, but they\u0026rsquo;re a big part of why AI text doesn\u0026rsquo;t read like mine - Claude loves emdashes and semicolons, I don\u0026rsquo;t use either.\nThe sentence starters were interesting too. \u0026ldquo;I\u0026rdquo; starts 9% of my sentences. Contractions as sentence openers are common (\u0026ldquo;I\u0026rsquo;ve\u0026rdquo; 3.5%, \u0026ldquo;I\u0026rsquo;m\u0026rdquo; 2.5%). Informal starters like \u0026ldquo;Yeah\u0026rdquo; (1.8%) and \u0026ldquo;Ah\u0026rdquo; (1.3%) show up regularly. Claude would never start a sentence with \u0026ldquo;Yeah\u0026rdquo; or \u0026ldquo;Ah\u0026rdquo; unless told to.\nBeyond the numbers I ran three qualitative analysis passes with Claude agents reading through the actual text:\nSource-specific patterns - How I structure PR descriptions vs Reddit comments vs bug reports. Turns out I have a consistent PR format (what it does, why, trade-offs, testing status) and a consistent Reddit comment format (direct answer first, personal experience backing, caveat, practical ending). Contrastive analysis - The most valuable one. Take passages from my writing, write how AI would phrase the same content, and annotate what\u0026rsquo;s different. This produces concrete before/after pairs that work much better than abstract rules. Register mapping - How my formality level shifts between contexts. I write differently in a GitHub PR review (\u0026ldquo;Ah yes, thanks for the reminder, I\u0026rsquo;ve rebased it now\u0026rdquo;) vs a Reddit opinion post vs a bug report with call stack traces. What the style guide looks like The final output is a structured markdown file with sections for each aspect of the voice. Here\u0026rsquo;s a few excerpts to give a sense of it.\nThe vocabulary mapping is a simple table of \u0026ldquo;use this, not the AI equivalent\u0026rdquo;:\nUse this Not this pretty (as modifier) fairly, quite, rather basically essentially a couple of several, a few tricky challenging, complex heaps a lot, extensively just simply The contrastive examples are probably the most effective part. Here\u0026rsquo;s one:\nAI: \u0026ldquo;I am quite confident that both embedded fields, as well as related areas, will experience significant disruption from AI, similar to the rest of the software engineering industry.\u0026rdquo;\nAuthor: \u0026ldquo;I\u0026rsquo;m pretty certain both / all embedded fields will be highly disrupted by AI, just like the rest of software engineering.\u0026rdquo;\nKey differences: \u0026ldquo;Pretty certain\u0026rdquo; not \u0026ldquo;quite confident\u0026rdquo;. Slash in \u0026ldquo;both / all\u0026rdquo; as informal hedge. \u0026ldquo;Just like\u0026rdquo; not \u0026ldquo;similar to\u0026rdquo;. Shorter, punchier. Contraction.\nAnd another:\nAI: \u0026ldquo;Hello! I apologize for the delayed response. It looks like you\u0026rsquo;ve made quite good progress on your own!\u0026rdquo;\nAuthor: \u0026ldquo;Hi, sorry I wasn\u0026rsquo;t able to help sooner, you\u0026rsquo;ve done pretty well though it seems!\u0026rdquo;\nKey differences: \u0026ldquo;Hi,\u0026rdquo; not \u0026ldquo;Hello!\u0026rdquo;. Comma splice. \u0026ldquo;Pretty well though it seems\u0026rdquo; - double hedge with trailing \u0026ldquo;though\u0026rdquo;. \u0026ldquo;Sorry I wasn\u0026rsquo;t able to help sooner\u0026rdquo; is specific, not generic.\nThere\u0026rsquo;s also a \u0026ldquo;What This Voice Never Does\u0026rdquo; section that lists patterns completely absent from 140K words of writing. Some of the entries:\nNever uses modern emoji. Only old-school text emoticons :-) :-D Never opens with a compliment to the person being addressed. No \u0026ldquo;Great question!\u0026rdquo; Never restates the question before answering it Never summarizes at the end of a section or response Never uses \u0026ldquo;I think\u0026rdquo; as false modesty before strong opinions, only for genuine uncertainty These \u0026ldquo;never\u0026rdquo; rules are surprisingly effective. A lot of what makes AI text read as AI is the presence of patterns real people don\u0026rsquo;t use, not just the absence of patterns they do.\nHow to build your own I\u0026rsquo;ve packaged the whole process into a Claude Code skill that walks you through it. It covers:\nCollect - Gathering writing samples from GitHub (gh CLI), Reddit (rexport), Stack Overflow, Slack, blogs, commit messages, or anywhere else you write Extract - Transforming raw data into a clean text corpus (scripts included for GitHub and Reddit) Analyse - Running quantitative metrics and qualitative pattern extraction (analysis script included, Python standard library only) Synthesise - Filling in a structured style guide template, creating a Claude Code output style, and optionally packaging as an installable skill The skill includes:\nscripts/analyze_style.py - Quantitative corpus analysis (sentence length, vocabulary, punctuation, readability, contractions, passive voice, n-grams) scripts/collect_github.sh - Automated GitHub PR/issue collection scripts/extract_reddit_text.py - Reddit JSON to plain text extraction references/style-guide-template.md - Blank template with all sections to fill in You need at least 20,000 words for a basic profile. 100,000+ words is where the statistical patterns become really reliable. Two different contexts (e.g., GitHub + Reddit, or work Slack + blog) gives a much better result than one source alone because it captures how your voice shifts by register.\nDownload: create-writing-style-skill.zip\nTo install, unzip into ~/.claude/skills/create-writing-style/ and it\u0026rsquo;ll be available in your Claude Code sessions. Ask Claude to help you \u0026ldquo;create a writing style\u0026rdquo; and the skill takes over from there.\nOh, and to be clear, I don\u0026rsquo;t have a degree in linguistics. I worked with Claude every step of the way through this - from designing the analysis approach, to running the quantitative and qualitative passes, to converting the results into a style guide, then packaging it as a reusable skill for others. Including writing this post. The irony of using AI to teach AI to sound less like AI is not lost on me, but it works pretty well.\n","permalink":"https://notes.alelec.net/posts/teaching-claude-to-write-like-me/","summary":"\u003cp\u003eI\u0026rsquo;ve been using Claude Code daily for months now. It writes most of my code, documentation, commit messages, PR descriptions. The code is great. The prose, not so much.\u003c/p\u003e\n\u003cp\u003eNot because it\u0026rsquo;s bad writing, it\u0026rsquo;s perfectly competent. The problem is it sounds like AI. Every PR description comes out with \u0026ldquo;This PR implements\u0026hellip;\u0026rdquo; and \u0026ldquo;Additionally\u0026hellip;\u0026rdquo; and perfect parallel structure across all bullet points. It\u0026rsquo;s polished in a way that I\u0026rsquo;m not, and that\u0026rsquo;s exactly what makes it obvious.\u003c/p\u003e","title":"Teaching Claude to Write Like Me (Not Like Claude)"},{"content":"Baratza Vario / Forte Motor drive parts and ratio Motor Baratza have at least 3 variants of motor used in the Vario\u0026hellip; and 120V/230V versions of each:\n* PN: 1036 / 1037 D-shaft motor * PN: 1058? / ?? Helical shaft motor * PN: 6026 / 6027 Hybrid shaft motor\nThere\u0026rsquo;s also two styles of motor enclosure used: not sure if these relate to specific part numbers above or not though, or it might be a Mahlkonig vs Baratza difference.\n1036 120V Motor D-Shaft (Vario/W, Forte) (use w/6394) https://www.baratza.com/shop/120-v-motor-d-shaft\n1037 230V Motor D-Shaft (Vario/W, Forte) (use w/6394) https://www.espressogear.com/products/230v-motor-d-shaft\n1058 120V helical https://www.espressotec.com/amp/baratza-grinder-motor-v2-120v-1058/\n6026 110v Motor (hybrid) - DCT-M-002 https://www.baratza.com/shop/110v-motor\n6027 230v Motor (hybrid) - DCT-M-003 https://www.coffeeparts.com.au/bt-6027-230v-motor\nNote: the Sette 270 commonly has the DCT-M-004-D motor, marked as 14000RPM (https://imgur.com/a/7DAejoU).\nI suspect that one/some of these motors may be build by Johnson https://shop.johnsonelectric.com/categories/dc-voltage-motor\nThe Intertek label on the left motor above is the regulatory body that\u0026rsquo;s certified the motor for sale.\nVario vs Forte Both the current Vario and Forte parts lists have the 6026/6027 as the listed motor for use - the hybrid one is supposed to be used for all current models.\nHowever, the Forte uses a different drive ratio, it runs faster with a wider tooth belt.\nVario: * Motor pulley: 18 teeth * Burr pulley: 96 teeth Drive ratio: 5.33 Forte: * Motor pulley: 17 teeth * Burr pulley: 68 teeth Drive ratio: 4.0 In Australia at least it\u0026rsquo;s easy to get the Forte drive: * https://www.coffeeparts.com.au/bt-1056-main-drive-pulley-with-metal-sleeve * https://www.coffeeparts.com.au/bt-1090-gt3-motor-drive-pulley * https://www.coffeeparts.com.au/bt-1027-gt3-belt * https://baratza.com/wp-content/uploads/2021/02/forte-plev-v4-020421.pdf\nVario belt Model: B113MXL - 9 Pitch: 2.032mm (0.08″) https://vbeltoutlet.com/product/b113mxl-timing-belt-replacement-113-teeth/\nForte belt Commonly called \u0026ldquo;GT3 Belt\u0026rdquo; Model: 3MR 240 Pitch: 3mm https://www.biedlers-belts.com/gates-3mr-240-09-belt.html\n","permalink":"https://notes.alelec.net/posts/vario---forte-motor/","summary":"\u003ch1 id=\"baratza-vario--forte-motor-drive-parts-and-ratio\"\u003eBaratza Vario / Forte Motor drive parts and ratio\u003c/h1\u003e\n\u003ch2 id=\"motor\"\u003eMotor\u003c/h2\u003e\n\u003cp\u003eBaratza have at least 3 variants of motor used in the Vario\u0026hellip; and 120V/230V versions of each:\u003c/p\u003e\n\u003cp\u003e* PN: 1036 / 1037 D-shaft motor\n* PN: 1058? / ?? Helical shaft motor\n* PN: 6026 / 6027 Hybrid shaft motor\u003c/p\u003e\n\u003cp\u003eThere\u0026rsquo;s also two styles of motor enclosure used:\n\u003cimg alt=\"motors\" loading=\"lazy\" src=\"/assets/622d6aebdfcbf9023602ed53.png\"\u003e\u003c/p\u003e\n\u003cp\u003enot sure if these relate to specific part numbers above or not though, or it might be a Mahlkonig vs Baratza difference.\u003c/p\u003e","title":"Vario / Forte motor"},{"content":"I\u0026rsquo;m quite a fan of my Sunbeam Torino It looks great and has a lot of solid features like dosed shot buttons, pour timer, pressure gauge, PID adjustable temperature control, quick warmup, strong steam and a full size (58mm) group head.\nWhen the Torino first launched, it did not review well, on CS the response was generally quite brutal\u0026hellip; Sunbeam trying to sell it for AUD$2000 put it up against a lot of big names in the industry and people in the know didn\u0026rsquo;t seem to think it matched up at all.\nI guess customers must have thought the same as it did not sell well either. As such, it ended up going on sale, hard. I got mine for a few dollars over AUD$1000.\nFor that price I think it\u0026rsquo;s basically a bargain. It was then in competition to a basic Rancilio (like I\u0026rsquo;d used at work and didn\u0026rsquo;t love) and similar switch on/off manual machines, or maybe a Breville dual boiler on special which is much larger, much slower to turn on and not that great to look at. I\u0026rsquo;d previously had the venerable EM6910 from sunbeam and it had been a very solid performer, so decided to stick with the brand.\nFor an in-depth review from a senior CS member take a look at the posts from noidle22 starting here: https://coffeesnobs.com.au/forum/equipment/brewing-equipment-pointy-end-1500-3000/41806-new-sunbeam-torino-triple-thermoblock?p=588187#post588187\nRight from the start I\u0026rsquo;ve been very happy with it in pretty much every way bar one: the pressure is way too high.\nWhile I don\u0026rsquo;t know for certain if the pressure gauge on the front is accurate (I don\u0026rsquo;t have a separate portafilter based gauge), it says my pour pressure is usually 12 - 14 bar if I want a brew time in the 20-30 second range. These shots are typically bitter / overextracted.\nThis high pressure also results in heaps of channeling, as seen as streams spraying everywhere from a naked portafilter (second hand EM6910 portafilter machined out).\nGrinding the coffee courser to reduce the pressure results in a pour time in the 10 - 20 second range with a watery weak drink as a result.\nEarly on I found the post noting the lack of an Over Pressure Valve (OPV) in the torino: https://coffeesnobs.com.au/brewing-equipment-pointy-end-1500-3000/42322-new-sunbeam-torino-triple-thermoblock-3.html#post569653 as well as mention that modding the machine to add one improved its consistency significantly: https://coffeesnobs.com.au/brewing-equipment-pointy-end-1500-3000/42322-new-sunbeam-torino-triple-thermoblock-3.html#post570264\nAn OPV, often called a bypass valve, is basically just a pressure relief valve. It has a high pressure side, usually both an inlet and outlet, which connects to the high pressure pump in the machine. There\u0026rsquo;s a low pressure fitting on the OPV which needs to be plumbed back to the low pressure side of the machine, eg. input of the pump. Any time the pressure on the inlet to the OPV raises above the set level a small amount of water is bled off to the low pressure side, just enough to reduce the pressure back below the desired level.\nNot having an OPV is a terrible ommission by Sunbeam, it\u0026rsquo;s a standard component in many / most espresso machines - especially premium ones. I\u0026rsquo;m really not sure why they never installed one in the first place, they\u0026rsquo;re not a particularly expensive or large component. Thankfully, it\u0026rsquo;s pretty straightforward to install one ourselves!\nParts Needed The high pressure plumbing in the Torino uses a combination of 1/8\u0026quot; BSP fittings and 4mm PTFE (teflon) hose on Jura style connectors.\n1/8\u0026quot; BSP fittings are very common in industry and espresso machines, however there are two distinct types: 1/8\u0026quot; BSPP (parallel thread) and 1/8\u0026quot; BSPT (tapered thread). Horribly annoying, as many fittings don\u0026rsquo;t say which they are, though sometimes you can see the taper on the male, sometimes you can see the o-ring (or space for one), other times you just have to guess and hope they seal :-( The low pressure side uses silicon tubing and matching push-on fittings. These are typically \u0026ldquo;secured\u0026rdquo; with basic cable ties.\nOPV / bypass valve There\u0026rsquo;s a few different brands / types of these available. I\u0026rsquo;ve used a Fluid-O-Tech Bypass Valve. This appears to be a premium part for a comparatively low price, however its inlet is a M12x1mm fitting so requires an extra adapter to connect it to the Torino.\nI got mine with matching adapter from: https://www.ebay.com.au/itm/174323702731\nI actually previously installed a Breville bypass valve (https://outwestcoffee.com.au/index.php/product/breville-bypass-valve/) but it was a pain to adjust and started leaking after ~1.5yr\nThere are lots of other ones on the market too, any brass, adjustable \u0026ldquo;Over Pressure Value\u0026rdquo; / \u0026ldquo;Bypass Valve\u0026rdquo; with 1/8 BSP fittings should be fine really.\nHigh Pressure Adapters I used a slightly odd assortment of fittings, it was a bit of a mix of parts I already had on hand. Feel free to mix it up yourself as you see fit. * teflon tape (or espresso machine suitable liquid thread-seal)\n* 1/8 BSP to 4mm Jura right angle (requires matching jura o-ring and clip as well as 1/8\u0026quot; o-ring)\nfitting jura o-ring jura clip 1/8\u0026quot; fitting o-ring * 1/8 BSP F-F socket https://www.ebay.com.au/itm/263072149632 * 1/8 BSP to 4mm 25bar push fitting (https://www.valvesonline.com.au/316-stainless-steel-push-fit-straight-union) * 4mm PTFE pressure hose with jura crimps (https://outwestcoffee.com.au/index.php/product/pressure-hose-22cm/) ###Notes: Turns out I should have skipped the 1/8\u0026quot; to Jura fitting I already had and just bought a second one of the push fittings. These are typically used / sold as Pneumatic connectors, but as long as you get one rated at least 20bar / 300psi (most are only half this) then you should be good to go. I find them much easier to use than the jura connectors.\nWhen using teflon tape, make sure you wrap it on flat / smoothly in the correct direction. If it\u0026rsquo;s the wrong direction it can become unwound as you screw in the fitting. Look up \u0026ldquo;teflon tape direction\u0026rdquo; for more guidance if needed. If your tape is wider than the fitting thread, make sure none \u0026ldquo;falls over\u0026rdquo; the edge of the thread into the pipe opening / where water flows - you don\u0026rsquo;t want the tape getting pulled off into the water flow.\nLow Pressure Plumbing * Silicon Tubing. I bought 4x7mm (1 meter length) but I\u0026rsquo;m pretty sure I should have bough 5x8mm instead - mine is a little smaller than what\u0026rsquo;s used elsewhere in the machine. * 5mm T Piece Plastic Hose Pipe Tube Connector (https://www.ebay.com.au/itm/270860547624) * small cable ties to strap the silicon pipe down onto the push fittings.\nDisassembly You\u0026rsquo;ll need only a philips head screwdriver for this part, it\u0026rsquo;s a pretty straightforward machine to get into.\nTake out the water jug and drip tray (might as well clean them while you\u0026rsquo;re at it).\nMost important: **Unplug the machine from the power.**\nThen start by removing the two screws on the lower back of the machine. Try not to get confused by the reflections in the panel - a stainless steel machine is hard to photo!\nPut these aside in a safe place, note they\u0026rsquo;re ever so slightly different to the ones you\u0026rsquo;ll pull off inside shortly.\nNow the 4 blobs on each side of the machine are also screws, covered with separate screw on caps. These caps can be removed without damage by covering them with a rag before gripping gently and turning anti-clockwise with pliers to loosen them. Then you can then unscrew them the rest of the way by hand. Under the caps are the screws to remove take all these all out and then both sides and back should basically fall off. Next remove the 4 screws near the top on both sides Take note of the screws as you pull them out, two are slightly shorter than the others. A good trick is to tape them next to / near the hole they came out of with some masking tape.\nThen with some lifting and jiggling the top frame and water jug should lift and fold back on the wires and pipes. I suggest you find a wall or something to lean it on to not stress the connections too much. Now looking down inside it you should find the main pump closest to the front of the unit, mine\u0026rsquo;s red; In that photo, the outlet of the pump is towards the top of the photo and has a noise damper directly attached (sort of flat square plastic thing) - you want to keep this! In my previous breville opv install I simply replaced the noise damper with the opv (they had matching inlet and outlet connectors) which worked, but the machine was significantly louder as a result!\nThe pump inlet is at the bottom of the above photo (silicon tubing) which goes to the flow sensor. Note the spring over the silicon tubing - this helps the tubing to bend smoothly and not kink, we\u0026rsquo;ll continue to make use of this later.\nInstalling the OPV While we\u0026rsquo;re on the low pressure side, we need to break into that connection between the pump and flow sensor. On my previous OPV install I plumbed the OPV low pressure outlet straight back to the water tank. After doing this, the dosed shot buttons were far less accurate than they used to be - whenever the pressure got above that opv threshold, some the water previously measured was being diverted back to the tank rather than through the group. So this time, I wanted to make sure that any bled-off water is fed back into low pressure side after the fluid sensor to preserve its accuracy.\nCarefully cut the cable tie on the silicon tube at the fluid sensor (next to the end of the spring in that photo) Then the pipe can be pulled / wiggled off the fluid sensor. You might want to jam some paper towel around it to catch any water leaking out.\nPush that silicon tube onto the tee piece and cut a short length of the new silicon tube to go from the tee back to the fluid sensor. Keep the spring on the piece going to the fluid sensor else it can get kinked once routed.\nA longer section of tube will be needed on the other outlet of the tee, you\u0026rsquo;ll want a piece that can reach out the other side of the machine.\nThen wiggle it all into place so it runs between the main pump and the steam pump beside it. Now onto the high pressure side.\nStart by assembling the fittings on your OPV. Basically you want to get 4mm PTFE hose connectors on both the high pressure inlet and outlet of the OPV.\nUse appropriate thread seal and spanners to do up everything nice and tight.\nThe right andle jura adapter was clearly 1/8\u0026quot; BSPP (parallel thread) because it comes with space for the o-ring. However, I could not screw it all the way into the OPV\u0026hellip; either the OPV outlet thread was tapered, or just not long enough, either way I just wrapped the fitting in tape and screwed it in as far as I could, and then a little bit more, and hoped it\u0026rsquo;d seal. In hindsight I probably should have swapped it and the push fitting over.\nBack over on the outlet side of the pump We want to disconnect the hose from the jura connector on the outlet of the noise damper (lower left corner) Looking closely at where the pipe goes into damper, you can see a metal clip holding it in With pliers, grap the clip by the looped side near the ruler in that image and pull it out.\nOnce the clip is out, the pipe can be pulled straight out (with a bit of wiggling) We will install the OPV in between the noise damper and this pipe shortly.\nFirst though, make sure the new low pressure pipe has been pulled through so it\u0026rsquo;s routed cleanly through the machine, out beside the noise damper. The low pressure pipe can be pushed onto the bleed outlet on the OPV.\nThe high pressure pipe that\u0026rsquo;s just been pulled out of the noise damper shall be connected to the high pressure outlet of the OPV assembly.\nI found it easiest to push the jura o-ring onto the end of the pipe first so it\u0026rsquo;s against the collar, then push that into the fitting. Once it\u0026rsquo;s in far enough, the clip should fit through easily.\nThe new 4mm pipe I bought had the correct jura collar on it so I inserted one end of that back into the noise damper.\nThe other end of this pipe needed to be cut off as the push fitting doesn\u0026rsquo;t need the collar. OK I should have used a sharp knife rather than side cutters, I needed to clean up the end a bit after this.\nThen just push the pipe into the push fitting and you\u0026rsquo;re good to go Right, at this point it\u0026rsquo;s all in one piece ready to test.\nLeave the fitting sitting out of the machine like this so that if it leaks, it should be on your bench and not into the machine electronics.\nCarefully sit the rear section of the machine back into place, making sure it\u0026rsquo;s all stable. Double check there\u0026rsquo;s no tools inside the machine and everything is clear of the electronics. Put the water tank back in and plug the machine into power. Don\u0026rsquo;t go anywhere near the inside of the machine while it\u0026rsquo;s like this!\nTurn it on, let it warm up. Put in a blank filter and pull the lever to start it running, carefully watching all the fittings and be ready to pull the power plug out if water goes everywhere.\nI\u0026rsquo;m my case there was no water spraying around which was a positive, but the pressure was only getting to 6.5 bar.\nBring out the flat blade screwdriver and adjust the OPV half a turn. 7 bar. Couple of turns later and it solid on 9bar\u0026hellip; and now there\u0026rsquo;s water beading out between the fittings on the OPV and also down the back of the noise damper.\nTightening all the fittings a touch on the OPV thankfully stopped that leak.\nI pulled the hose back out of the jura fitting on the noise damper to inspect. I think the o-ring might have got it of whack a bit. I carefully reassembled it again and it didn\u0026rsquo;t seem to be leaking anymore. Success!\nSo now to physically install the OPV somewhere.\nI had to twist and wiggle the hoses a bit to find somewhere I could strap the OPV to without destroying or resizing any of the hoses.\nEventually I decided that cable tie-ing it to the side of an existing valve behind the front panel was the best solution. The high pressure hose from noise damper to OPV was threatening to bend out towards the side panel, which I was worried would cause loud vibrations during use. To mitigate this I cut some more silicon tubing and pushed that over the pipe. This helped to smooth out tight bends in the pipe and also means there\u0026rsquo;s some soft padding to take out vibrations. It seems to work, the machine is still nice and quiet during use (compared to most vibe pump machines).\nMachine reassembled the rest of the way, time to make coffee. Fresh beans, nice and fine, yep the shot pulls much better - pressure topping out at a nice steady 9 bars.\nI\u0026rsquo;m calling that a successful finish to the job. I guess time will tell how much difference it makes to my coffees!\n","permalink":"https://notes.alelec.net/posts/sunbeam-torino-em8000--installing-an-opv/","summary":"\u003ch1 id=\"im-quite-a-fan-of-my-sunbeam-torino\"\u003eI\u0026rsquo;m quite a fan of my Sunbeam Torino\u003c/h1\u003e\n\u003cp\u003e\u003cimg alt=\"Torino\" loading=\"lazy\" src=\"/assets/62104116dfcbf9023602ea08.png\"\u003e\u003c/p\u003e\n\u003cp\u003eIt looks great and has a lot of solid features like dosed shot buttons, pour timer, pressure gauge, PID adjustable temperature control, quick warmup, strong steam and a full size (58mm) group head.\u003c/p\u003e\n\u003cp\u003eWhen the Torino first launched, it did not review well, on CS the response was generally quite brutal\u0026hellip; Sunbeam trying to sell it for AUD$2000 put it up against a lot of big names in the industry and people in the know didn\u0026rsquo;t seem to think it matched up at all.\u003c/p\u003e","title":"Sunbeam Torino EM8000: Installing an OPV"},{"content":"At work we needed to certify a BLE device recently. We had the legacy PTS dongle provided by Bluetooth SIG, however I found it only supports testing devices up the BLE 4.2\nSo we need a new BLE Dongle - they now only support the Laird Connectivity | 451-00004\nhttps://store.bluetooth.com/\nThis is normally stocked by all the online electronics distributers; element14, digikey, mouser, arrow etc. Unfortunately it was out of stock on all of them, for about 4 months.\nNormally you need to buy this dongle then flash the PTS firmware onto it: https://support.bluetooth.com/hc/en-us/articles/360049019732-How-to-upgrade-the-firmware-of-your-PTS-Dongle-\nIt turns out this is basically just a normal nrf52840 dongle in a plastic case with a copy of the nordic bootloader with their own private key in it.\nThis private key change blocks the DFU from allowing the standard PTS firmware upgrade tool from just being able to flash straight onto it.\nThe firmware update tool has a folder in it with a DFU file in it, which you would normally flash by pressing the side-button on the dongle to put it into update mode - it then has it\u0026rsquo;s led pulse red and it comes up as a COM port, you then run:\nC:\\Program Files (x86)\\Bluetooth SIG\\PTS Firmware Upgrade Software\\tools\u0026gt;nrfutil.exe dfu serial -p COM6 --pkg nrf52840_xxaa_default_v5.zip﻿​ This fails with the helpful message:\nTraceback (most recent call last): File \u0026#34;nordicsemi\\__main__.py\u0026#34;, line 1537, in \u0026lt;module\u0026gt; File \u0026#34;site-packages\\click\\core.py\u0026#34;, line 764, in __call__ File \u0026#34;site-packages\\click\\core.py\u0026#34;, line 717, in main File \u0026#34;site-packages\\click\\core.py\u0026#34;, line 1137, in invoke File \u0026#34;site-packages\\click\\core.py\u0026#34;, line 1137, in invoke File \u0026#34;site-packages\\click\\core.py\u0026#34;, line 956, in invoke File \u0026#34;site-packages\\click\\core.py\u0026#34;, line 555, in invoke File \u0026#34;nordicsemi\\__main__.py\u0026#34;, line 1056, in serial File \u0026#34;nordicsemi\\__main__.py\u0026#34;, line 970, in do_serial File \u0026#34;nordicsemi\\dfu\\dfu.py\u0026#34;, line 123, in dfu_send_images File \u0026#34;nordicsemi\\dfu\\dfu.py\u0026#34;, line 95, in _dfu_send_image File \u0026#34;nordicsemi\\dfu\\dfu_transport_serial.py\u0026#34;, line 250, in send_init_packet File \u0026#34;nordicsemi\\dfu\\dfu_transport_serial.py\u0026#34;, line 244, in try_to_recover File \u0026#34;nordicsemi\\dfu\\dfu_transport_serial.py\u0026#34;, line 421, in __execute File \u0026#34;nordicsemi\\dfu\\dfu_transport_serial.py\u0026#34;, line 505, in __get_response pc_ble_driver_py.exceptions.NordicSemiException: Response Code InvalidObject [4064] Failed to execute script __main__This fails with the helpful message: Apparently this InvalidObject typically means signature mismatch? EIther way, it continued to fail. If you unpack the zip it\u0026rsquo;s got a manifest file that shows this is just a bootloader anyway, not the actual PTS code.\nIf I put the dongle into this same update mode and tried their gui tool, it actually failed at the same place, same message.\nI originally had the standard firmware on the nrf52840 dongle that runs with nrf connect app. I also tried with connectivity_4.1.4_usb_with_s132_5.1.0.hex from: https://github.com/NordicSemiconductor/pc-ble-driver/tree/v4.1.1/hex/sd_api_v5\nIn the upgrade folder (C:\\Program Files (x86)\\Bluetooth SIG\\PTS Firmware Upgrade Software) I went searching for the real firmware, not just the bootloader.\nLooking at PTSFirmwareUpgradeSoftware.exe.config file, I see mention of a log file: \u0026lt;file type=\u0026quot;log4net.Util.PatternString\u0026quot; value=\u0026quot;%env{LOCALAPPDATA}\\ptsfirmwareupdate_log.txt\u0026quot; /\u0026gt;So, open up the log file and see:\n2021-05-11 09:25:58,594 ERROR Failed to RESET a dongle 2021-05-11 09:26:01,613 ERROR Failed to RESET a dongle 2021-05-11 09:26:01,616 DEBUG Found Dongle: Name:COM6, Installed Firmware:0.0.0.0, New Firmware:11.2117.0.0 2021-05-11 09:26:11,188 INFO Start to download firmware from web server 2021-05-11 09:26:44,435 DEBUG Path doesn\u0026#39;t exist. Create a new path C:\\Users\\anl\\AppData\\Local\\PTSFirmwareUpgradeSoftware 2021-05-11 09:26:46,113 INFO Start a thread to programCOM6 2021-05-11 09:26:46,115 DEBUG Requested Laird dongle programming. 2021-05-11 09:27:00,166 DEBUG This is a new dongle. Use PTS default bootloader - nrf52840_xxaa_default_v5.zip 2021-05-11 09:27:00,167 DEBUG Started updating bootloader. 2021-05-11 09:27:34,087 ERROR Failed to upload bootloader application. 2021-05-11 09:27:51,990 ERROR Failed to RESET a dongle 2021-05-11 09:27:55,022 ERROR Failed to RESET a dongle Ah, there\u0026rsquo;s another interesting folder to look in: C:\\Users\\anl\\AppData\\Local\\PTSFirmwareUpgradeSoftware\nC:\\Program Files (x86)\\Bluetooth SIG\\PTS Firmware Upgrade Software\\tools\u0026gt;dir C:\\Users\\anl\\AppData\\Local\\PTSFirmwareUpgradeSoftware Directory of C:\\Users\\anl\\AppData\\Local\\PTSFirmwareUpgradeSoftware 11/05/2021 02:55 PM 206,306 defa71ef-2902-4a41-a49d-5a90ee2c4ac5.bin 11/05/2021 02:55 PM 39,401 nrf52840_xxaa_pts_v5.zip﻿​ Hmm, that zip looks better. Extract it, yep similar dfu pkg to the previous bootloader one, complete with manifest json - darn it\u0026rsquo;s just the bootloader again.\nC:\\Program Files (x86)\\Bluetooth SIG\\PTS Firmware Upgrade Software\\tools\u0026gt;nrfutil.exe pkg display C:\\Users\\anl\\AppData\\Local\\PTSFirmwareUpgradeSoftware\\nrf52840_xxaa_pts_v5.zip DFU Package: \u0026lt;C:\\Users\\anl\\AppData\\Local\\PTSFirmwareUpgradeSoftware\\nrf52840_xxaa_pts_v5.zip\u0026gt;: | |- Image count: 1 | |- Image #0: |- Type: bootloader |- Image file: nrf52840_xxaa.bin |- Init packet file: nrf52840_xxaa.dat | |- op_code: INIT |- signature_type: ECDSA_P256_SHA256 |- signature (little-endian): b\u0026#39;c6889bb01b1c189dbe60222d04eb1d0d6471a2c12da724662ee7a94441f8d1267d6d780f202f52ec9132556133a2dd6246be3bb5efa009ba625bcb986f9b0e1b\u0026#39; | |- fw_version: 0x00000005 (5) |- hw_version 0x00000034 (52) |- sd_req: 0x00 |- type: BOOTLOADER |- sd_size: 0 |- bl_size: 38760 |- app_size: 0 | |- hash_type: SHA256 |- hash (little-endian): b\u0026#39;458566a2ba3443a5acc572f61e9ba269fa5e80c11844253cd77a3742084db9e3\u0026#39; | |- boot_validation_type: [\u0026#39;VALIDATE_GENERATED_CRC\u0026#39;] |- boot_validation_signature (little-endian): [b\u0026#39;\u0026#39;] | |- is_debug: False Tried flashing it anyway, nope same InvalidObject error.\nSo take a look at the bin in a hex editor, oh, the first two bytes are PK that\u0026rsquo;s just a normal zip! Unzip it and yeah, it\u0026rsquo;s another dfu file actually however with a much larger bin.\nC:\\Program Files (x86)\\Bluetooth SIG\\PTS Firmware Upgrade Software\\tools\u0026gt;nrfutil.exe pkg display C:\\Users\\anl\\AppData\\Local\\PTSFirmwareUpgradeSoftware\\defa71ef-2902-4a41-a49d-5a90ee2c4ac5.bin DFU Package: \u0026lt;C:\\Users\\anl\\AppData\\Local\\PTSFirmwareUpgradeSoftware\\defa71ef-2902-4a41-a49d-5a90ee2c4ac5.bin\u0026gt;: | |- Image count: 1 | |- Image #0: |- Type: application |- Image file: pts-ctr.bin |- Init packet file: pts-ctr.dat | |- op_code: INIT |- signature_type: ECDSA_P256_SHA256 |- signature (little-endian): b\u0026#39;b5a3496dd95fc71c265e71956bb0bebd7c9a39092dbf1cb5b4d8385b00e09d36fbb03c23b33f33509dc6ec45688b1f96345424d165f5c725edced3ad3ec6e11a\u0026#39; | |- fw_version: 0x00000001 (1) |- hw_version 0x00000034 (52) |- sd_req: 0x00 |- type: APPLICATION |- sd_size: 0 |- bl_size: 0 |- app_size: 205700 | |- hash_type: SHA256 |- hash (little-endian): b\u0026#39;807c356f0da49ab0f68b404e73565ab0a87babbb1cb5b61f80048ab4b94442d9\u0026#39; | |- boot_validation_type: [\u0026#39;VALIDATE_GENERATED_CRC\u0026#39;] |- boot_validation_signature (little-endian): [b\u0026#39;\u0026#39;] | |- is_debug: False Brilliant, that\u0026rsquo;s the application!\nStrangely, this one just flashed fine for me, finally :-)\nC:\\Program Files (x86)\\Bluetooth SIG\\PTS Firmware Upgrade Software\\tools\u0026gt;nrfutil.exe dfu serial -p COM6 -pkg C:\\Users\\anl\\AppData\\Local\\PTSFirmwareUpgradeSoftware\\defa71ef-2902-4a41-a49d-5a90ee2c4ac5.bin [#######-----------------------------] 19% 00:01:28﻿​ For reference I started with connectivity_4.1.4_usb_with_s132_5.1.0.hex flashed on my dongle.\nAfter it\u0026rsquo;s finished, check device manager. Hmm\u0026hellip; it\u0026rsquo;s coming up as a COM port but it still looks like DFU update mode:\nThe red light isn\u0026rsquo;t pulsing though.\nStart up Bluetooth PTS app and rejoice, the dongle is recognised!\nConnect to the dongle, start the new workspace wizard and yes, scanning for devices works - looks like we\u0026rsquo;re away and running\nNow, the fun of actually doing testing begins\u0026hellip;\n","permalink":"https://notes.alelec.net/posts/bluetooth-sig-pts-testing-without-the-laird-connectivity-pts-dongle/","summary":"\u003cp\u003eAt work we needed to certify a BLE device recently. We had the legacy PTS dongle provided by Bluetooth SIG, however I found it only supports testing devices up the BLE 4.2\u003c/p\u003e\n\u003cp\u003e \u003c/p\u003e\n\u003cp\u003eSo we need a new BLE Dongle - they now only support the Laird Connectivity | 451-00004\u003c/p\u003e\n\u003cp\u003e\u003cimg alt=\"BL654-SERIES-LRD-FNT\" loading=\"lazy\" src=\"https://media.futureelectronics.com/SEMICONDUCTORS/WIRELESS-RF/RF-MODULES-SOLUTIONS/BLUETOOTH/BL654-SERIES-LRD-FNT-MED.JPG?m=lfeTUb\"\u003e\u003c/p\u003e\n\u003cp\u003e\u003ca href=\"https://store.bluetooth.com/\"\u003ehttps://store.bluetooth.com/\u003c/a\u003e\u003c/p\u003e\n\u003cp\u003e \u003c/p\u003e\n\u003cp\u003eThis is normally stocked by all the online electronics distributers; element14, digikey, mouser, arrow etc. Unfortunately it was out of stock on all of them, for about 4 months.\u003c/p\u003e","title":"Bluetooth SIG PTS Testing without the Laird Connectivity PTS Dongle"},{"content":"I\u0026rsquo;m a big fan of my Sunbeam Torino I\u0026rsquo;ve had my Torino for about a year now. I read the reviews talking it down before I bought it but didn\u0026rsquo;t have the bench space for a BDB. I also got it for about AUD 1K, much less than the original RRP. For the price I think it\u0026rsquo;s the best looking machine that has all the conveniences like dosed shot buttons, pour timer, quick startup etc.\nRight from the start I\u0026rsquo;ve been very happy with it in every way bar one: the pressure is way too high.\nI don\u0026rsquo;t know if the pressure gauge on the front is accurate (I don\u0026rsquo;t have a separate grouphead gauge yet) but it says my pour pressure is usually 12 - 14 bar if I want a brew time in the 20-30 second range. Grinding/packing the grounds lighter to reduce the pressure results in a pour time in the 10 - 20 second range with flavourless coffee.\nA while back I got the bottom of my old EM6910 portafilter machined out to make myself a naked portafilter. Using this gets heaps of squirting all over the place, it makes a huge mess. The puck always looks pretty channelled too, supporting my belief the pressure it too high.\nEarly on I found the post noting the lack of OPV in the torino: https://coffeesnobs.com.au/brewing-equipment-pointy-end-1500-3000/42322-new-sunbeam-torino-triple-thermoblock-3.html#post569653 as well as mention that modding the machine to add one improved it significantly: https://coffeesnobs.com.au/brewing-equipment-pointy-end-1500-3000/42322-new-sunbeam-torino-triple-thermoblock-3.html#post570264\nBut this does sound somewhat difficult, I don\u0026rsquo;t have the required plumbing supplies hanging around and finding the array of fittings to suit felt too hard, I\u0026rsquo;m not versed in sizes, connector types etc.\nThen I found out about adding a dimmer to the pump: https://coffeeforums.co.uk/topic/7910-controlling-vibe-pump-with-a-dimmer-switch/\nI\u0026rsquo;m much more comfortable with electronics and electrical devices, so this was right up my alley. It\u0026rsquo;s also easily reversible; it doesn\u0026rsquo;t require and cutting / modifying of the machine internals so if I don\u0026rsquo;t like the results, or if something goes wrong and I need to send it in for service, I simply open it up, unplug the dimmer, plug the pump back in and no one\u0026rsquo;s the wiser.\nThe Dimmer This is an off-the-shelf light dimmer: Note its label says it\u0026rsquo;s a leading edge dimmer. There\u0026rsquo;s basically three main types of dimmer on the market: * Leading Edge * Trailing Edge * Universal\nLeading Edge The original / oldest type of normal light dimmers. For each cycle of the AC power waveform these take a chunk off the start, leaving only the final part of each waveform. These typically don\u0026rsquo;t work well with modern electronic and LED based lighting systems, driving the development of the newer generation of dimmers\nTrailing Edge As the name suggests, these leave the start of each waveform intact, chopping out the back instead. These work much better with most LED and electronic power supplies so have risen in popularity. However they don\u0026rsquo;t work well eith magnetic or inductive loads due to the back emf from chopping the waveform under full load. This will often damage the dimmer if used to drive these, as well as possibly the load.\nUniversal These include some version of smarts / circuitry to attempt to determine what kind of load is connected and choose between Leading and Trailing edge mode automatically.\nMy Dimmer Note in the picture above, my dimmer is leading edge. **This is very important.** The vibration pump in the espresso machine is basically one large electromagnet, pulsing on and off. As such it\u0026rsquo;s very much an inductive / magnetic load so a trailing edge dimmer is not appropriate.\nThe first dimmer I tried was a newer/cheaper universal one, a DETA 6032 I got from Bunnings (Australia) as part of a dimmer wall plate: https://www.detaelectrical.com.au/detail-2/?de=6130B The dimmer itself had a translucent purple housing.\nI initially wired this up, powered up the coffee machine and pulled the handle to start the water flowing. I heard relays all click, but the pump did not start. I tried the dimmer connected both direction, on both pump terminals, but it made no difference. I suspect it\u0026rsquo;s internal smarts failed to detect what kind of load I had running and gave up.\nThe dimmer seen above is the second one I got my hands on.\nI\u0026rsquo;d suggest trying to find a fixed type Leading Edge dimmer. Reading other posts on the topic suggest you want one with a rather low minimum wattage rating. Most vibration pumps are apparently in the order of 40W so you want a minimum well below this.\nNow, on to installing the dimmer into your machine.\nDisassembly You\u0026rsquo;ll need only a philips head screwdriver for this part, it\u0026rsquo;s a pretty straightforward machine to get into.\nTake out the water jug and drip tray (might as well clean them while you\u0026rsquo;re at it).\nMost important: **Unplug the machine from the power.**\nThen start by removing the two screws on the lower back of the machine. Try not to get confused by the reflections in the panel - a stainless steel machine is hard to photo!\nPut these aside in a safe place, note they\u0026rsquo;re ever so slightly different to the ones you\u0026rsquo;ll pull off inside shortly.\nNow the 4 blobs on each side of the machine are also screws, covered with separate screw on caps. These caps can be removed without damage by covering them with a rag before gripping gently and turning anti-clockwise with pliers to loosen them. Then you can then unscrew them the rest of the way by hand. Under the caps are the screws to remove take all these all out and then both sides and back should basically fall off. Next remove the 4 screws near the top on both sides Take note of the screws as you pull them out, two are slightly shorter than the others. A good trick is to tape them next to / near the hole they came out of with some masking tape.\nThen with some lifting and jiggling the top frame and water jug should lift and fold back on the wires and pipes. I suggest you find a wall or something to lean it on to not stress the connections too much. Now looking down inside it you should find the main pump closest to the front of the unit, mine\u0026rsquo;s red; The pump has two wires on standard spade connectors. We\u0026rsquo;re going to put the dimmer inline with (either) one of these. Installing the dimmer You\u0026rsquo;ll need a male and female spade connector, to be crimped onto the two dimmer wires. It would better to have ones with a shroud, I had these ones on hand so put some heatshink over them for insulation after I\u0026rsquo;d crimped them onto the dimmer. Next you\u0026rsquo;ll need to unplug one of the wires from the pump. It should wiggle and pull back off the terminal, it\u0026rsquo;s not clipped on as such but it is fairly difficult to get off the first time.\nThen plug the dimmer wires onto both the pump and the unplugged wire before tucking the dimmer out of the way to the side where the knob is accessible. Test it Now fold the top and back into position and put in a couple of screws half in to hold it in position. You can put the water tank back in now and power up the machine, as long as you **promise yourself to keep your hands well out of the insides** while it\u0026rsquo;s plugged in. If you\u0026rsquo;re unsure, keep one hand behind you back (or in a packet) the entire time the machine is running with the sides off, this will help you focus on the one hand you\u0026rsquo;re using.\nStart with the dimmer on max and turn on the machine. Once it\u0026rsquo;s warmed up try to start the water / pull a shot. Hopefully your pump runs and the machine works like normal.\nIf you hear a click but no water, unfortunately your dimmer is probably not compatible. Double check it\u0026rsquo;s turned up to max and try again. If there\u0026rsquo;s still no joy, bad luck. **Unplug the power to the machine** and then and only then unplug the dimmer before plugging the machine\u0026rsquo;s wire back directly into the pump. You could try re-wiring the dimmer the other way around, or try the other pump wire, but this didn\u0026rsquo;t work for me. You may need to just try a different dimmer like I did.\nIf it is working however, you can try turning the dimmer down slightly and see if the pump still works, then keep turning it down gradually to see what range you get. It\u0026rsquo;s then up to you to play around pulling shots and and checking out the change in pressure as you use it.\nWith my dimmer however, even on max it slows the pump down a lot. It sounds different, probably a bit louder too. The dimmer possibly also has a bit of a soft start in it, when the pump first clicks on I can hear it ramping up slower than normal. Either that or its just a function of the reduced power.\nWith the leading edge sort of dimmer I believe it should be safe for the pump, if anything it should extend its life a bit. I\u0026rsquo;m not certain though and could be quite wrong, hopefully I don\u0026rsquo;t burn out my pump and I definitely don\u0026rsquo;t make any guarantees.\nThe pour If I pack and tamp the coffee as per normal, I now get the pressure gauge showing 9 - 10 bar instead of 14 - 16.\nThe first couple of shots I pulled tasted great, definitely a big improvement for me!\nAlso, I can now use my naked portafilter without making a mess :-) No more spraying at all, I get a good consistent pour, looking very nice. Your milage will definitely vary though, each dimmer will likely behave differently. I tried turning the dimmer down a bit and the pump almost immediately stopped working altogether, so for now I don\u0026rsquo;t have much adjustment, just the reduction mentioned above. I\u0026rsquo;ve already ordered a different Leading Edge dimmer to try, see if it behaves differently / better.\nBack in one piece and good to go Once you\u0026rsquo;ve tweaked the pressure a bit and are happy with the pour rates, re-assembly is just the reverse of disassembly.\nFully screw the top back with it the 4 self tap screws on each side.\nBe careful putting the screws back in, they have a tendency to cross-thread / self-tap new threads. Best to try twisting them the wrong way by hand a little until you feel a slight click, this is the thread falling into place, then you should be able to tighten up again.\nThen sit the back on in place, the top lip fits into a slot below the top of the machine. While it\u0026rsquo;s sitting there, the sides can go on and be screwed in, these hold the back in place.\nFinally the back bottom two screws. If they don\u0026rsquo;t immediately go into the hole you may need a torch to check if the holes in the metal line up with the holes in the black plastic behind it - you may need to use a tiny screydriver or something to poke in and wiggle the black bit down / across to line up the holes.\nEnjoy the smoother coffee! ","permalink":"https://notes.alelec.net/posts/sunbeam-torino-em8000--reducing-the-pressure-with-a-dimmer/","summary":"\u003ch1 id=\"im-a-big-fan-of-my-sunbeam-torino\"\u003eI\u0026rsquo;m a big fan of my Sunbeam Torino\u003c/h1\u003e\n\u003cp\u003eI\u0026rsquo;ve had my Torino for about a year now.\nI read the reviews talking it down before I bought it but didn\u0026rsquo;t have the bench space for a BDB. I also got it for about AUD 1K, much less than the original RRP.\nFor the price I think it\u0026rsquo;s the best looking machine that has all the conveniences like dosed shot buttons, pour timer, quick startup etc.\u003c/p\u003e","title":"Sunbeam Torino EM8000: Reducing the pressure with a dimmer"},{"content":"Windows CI Build Node Install Hyper V Server 2016 (free perpetual eval licence)\nhttps://www.microsoft.com/en-us/evalcenter/evaluate-hyper-v-server-2016\nhttps://technet.microsoft.com/hyper-v-server-docs/Hyper-V-Server-2016\nhttps://blog.docker.com/2016/09/build-your-first-docker-windows-server-container/\nInstall on your hardware/vm of choice.\noVirt / KVM If you\u0026rsquo;re using oVirt or other KVM based hypervisor for you host, you\u0026rsquo;ll likely want the console viewer application installed on your local machine: https://virt-manager.org/download/sources/virt-viewer/virt-viewer-x64-6.0.msi\nSet up the vm with the disk connected to IDE initially, we can switch it over to faster VirtIO once drivers are installed.\nThe network adapter will need to be set to \u0026ldquo;Dual mode rtl8139, VirtIO\u0026rdquo;\nOnce installed and initial setup completed, ensure the guest tools are installed:\nwget -UseBasicParsing https://www.spice-space.org/download/windows/spice-guest-tools/spice-guest-tools-latest.exe -Outfile spice-guest-tools-latest.exe .\\spice-guest-tools-latest.exe The hardware drivers in the VM can now be changed to VirtIO interfaces for best performance.\nSystem Setup Once it\u0026rsquo;s installed you\u0026rsquo;ll see a console on the vm screen. Firstly you\u0026rsquo;ll be asked to set a password, do so with something memorable.\nThere should be a blue menu visible on the console.\nRemote Desktop can be enabled with menu \u0026lsquo;7\u0026rsquo;\nPress \u0026lsquo;8\u0026rsquo; to show Network Settings to see the current IP address. We\u0026rsquo;ll need that and the \u0026ldquo;Computer Name\u0026rdquo; displayed on the home screen below.\nRemote desktop on your local machine can now be used to connected to the IP address shown with the username \u0026ldquo;Administrator\u0026rdquo; and the password set earlier. This allows copy/paste to work.\nRemote Powershell I generally find it easiest to use remote desktop into the machine, however remote powershell can also be used. Skip this if remote desktop works for you.\nOn your windows desktop, open an admin powershell prompt to remote connect to the new vm.\nThen follow these steps\n$IP=\u0026#34;172.29.50.XXX\u0026#34; # as seen previously $COMP_NAME=\u0026#34;WIN-UOM8ITSP5NN\u0026#34; # again, use the real name as seen above net start WinRM Set-Item WSMan:\\localhost\\Client\\TrustedHosts -Value $IP Enter-PSSession -ComputerName $IP -Credential $COMP_NAME\\Administrator It will prompt for the password (set earlier) then you should be sitting at a remote powershell prompt\nInstalling Docker https://docs.docker.com/docker-for-windows\nhttps://docs.microsoft.com/en-us/virtualization/windowscontainers/quick-start/quick-start-windows-server\nFrom the powershell prompt:\nInstall-Module -Name DockerMsftProvider -Repository PSGallery -Force # Press Y to continue Install-Package -Name docker -ProviderName DockerMsftProvider # Press A to accept installation from DockerDefault source # This can display an error which can be ignored: \u0026#34;The role, role service, or feature name is not valid: \u0026#39;containers\u0026#39;. The name was not found.\u0026#34; Restart-Computer -Force Verify docker docker run -it --rm microsoft/windowsservercore # Should eventually dump you in a new shell dir # Should look like a different system exit Install git Start with choco, then use it to install git for windows\niex ((New-Object System.Net.WebClient).DownloadString(\u0026#39;https://chocolatey.org/install.ps1\u0026#39;)) refreshenv choco install git -y -params \u0026#39;\u0026#34;/GitAndUnixToolsOnPath\u0026#34;\u0026#39; refreshenv﻿​ Powershell download errors Powershell has be giving errors below on some sites, ensure it accepts tls\n[Net.ServicePointManager]::SecurityProtocol = \u0026#34;tls12, tls11, tls\u0026#34; Desktop\nThe Hyper-V server desktop is quite sparse, it is easier to use with Cairo Desktop installed: https://cairoshell.com/\nwget -UseBasicParsing \u0026#34;https://github.com/cairoshell/cairoshell/releases/download/v0.3.6693/CairoSetup_64bit.exe\u0026#34; -Outfile CairoSetup_64bit.exe .\\CairoSetup_64bit.exe ﻿​ During install, when selecting components, you will want to enable \u0026ldquo;Advanced users only: Replace Explorer\u0026rdquo;\nOnce Cairo Desktop is installed, the service console wont be automatically openned at login. It can be accessed by openning a cmd prompt and running\nsconfig Gitlab CI runner Install gitlab runner and configure one of the following two setup types:\nDocker runner # Beta runner with native docker support: https://gitlab.com/andrewleech/gitlab-runner wget -UseBasicParsing https://gitlab.com/andrewleech/gitlab-runner/-/jobs/85269208/artifacts/raw/out/binaries/gitlab-runner-windows-amd64.exe -Outfile c:\\windows\\system32\\gitlab-runner.exe $env:REGISTRATION_TOKEN=\u0026#34;\u0026lt;token from https://gitlab.com/\u0026lt;project settings\u0026gt;/runners\u0026gt;\u0026#34; $env:RUNNER_NAME=\u0026#34;WindowsDockerRunner\u0026#34; $env:CONFIG_FILE=\u0026#34;C:\\\\config.toml\u0026#34; $env:REGISTER_LOCKED=\u0026#34;false\u0026#34; $env:RUNNER_EXECUTOR=\u0026#34;docker\u0026#34; $env:RUNNER_TAG_LIST=\u0026#34;docker,windows\u0026#34; $env:RUNNER_SHELL=\u0026#34;powershell\u0026#34; $env:RUNNER_BUILDS_DIR=\u0026#34;c:\\gitlab\\builds\u0026#34; $env:RUNNER_CACHE_DIR=\u0026#34;c:\\gitlab\\cache\u0026#34; $env:DOCKER_TLS_VERIFY=\u0026#34;false\u0026#34; $env:DOCKER_IMAGE=\u0026#34;microsoft/windowsservercore:latest\u0026#34; $env:DOCKER_VOLUMES=\u0026#34;C:\\gitlab\\cache\u0026#34; $env:DOCKER_CACHE_DIR=\u0026#34;c:\\gitlab\\cache\u0026#34; $env:DOCKER_PULL_POLICY=\u0026#34;if-not-present\u0026#34; $env:DOCKER_HELPER_IMAGE=\u0026#34;registry.gitlab.com/andrewleech/gitlab-runner/gitlab-runner-helper:win-x86_64-latest\u0026#34; cd \\ mkdir \\gitlab gitlab-runner register --non-interactive --url=\u0026#34;https://gitlab.com\u0026#34; # Install the service gitlab-runner install -user .\\LocalSystem ## Docker runners on windows not released yet: ## https://gitlab.com/gitlab-org/gitlab-ci-multi-runner/issues/1303 ## https://gitlab.com/gitlab-org/gitlab-ci-multi-runner/issues/1729﻿​ Local powershell runner This is useful for building docker images, etc. I haven\u0026rsquo;t got docker-in-docker working on windows yet (haven\u0026rsquo;t really tried recently)\n# Skip the wget if you\u0026#39;ve already installed the docker beta one above wget -UseBasicParsing https://gitlab-runner-downloads.s3.amazonaws.com/latest/binaries/gitlab-runner-windows-amd64.exe -Outfile c:\\windows\\system32\\gitlab-runner.exe # To register a shared host shell runner for building docker images etc $REGISTRATION_TOKEN=\u0026#34;\u0026lt;token from https://gitlab.com/admin/runners\u0026gt;\u0026#34; gitlab-runner register --non-interactive --url=\u0026#34;https://gitlab.com\u0026#34; --registration-token=$REGISTRATION_TOKEN --description=\u0026#34;WindowsHostRunner\u0026#34; --executor=\u0026#34;shell\u0026#34; --shell=\u0026#34;powershell\u0026#34; --tag-list=\u0026#34;windows_docker_host,powershell\u0026#34; # Install the service, if not already done above gitlab-runner install -user .\\LocalSystem﻿​ Windows Admin Center\n$cert = (New-SelfSignedCertificate -DnsName \u0026#34;SleakWin\u0026#34; -CertStoreLocation \u0026#34;cert:\\LocalMachine\\My\u0026#34; -NotAfter (Get-Date).AddYears(10)).Thumbprint | Out-String # TODO these params settings don\u0026#39;t appear to work # choco install -y windows-admin-center --params \u0026#34;/Thumbprint:$cert /Port:443\u0026#34; echo $cert choco install -y windows-admin-center --params \u0026#34;\u0026#39;/Thumbprint:\u0026lt;copy the thumbnail printed above\u0026gt; /Port:443\u0026#39;\u0026#34; Restart-Computer -Force Random Shutdowns Sometimes the free licence can get out of whack and expires, resulting in the vm starts shutting down every hour.\nThis should be resolved by running\nSlmgr.vbs -rearm Remote Admin The Hyper-V Server can be remotely administered with MS Remote Server Administration Tools (RSAT): https://www.microsoft.com/en-au/download/details.aspx?id=45520\nTo enable this, the following firewall ports need to be opened on the hyperv server:\nSet-NetFirewallRule -DisplayGroup \u0026#39;Windows Management Instrumentation (WMI)\u0026#39; -Enabled true -PassThru Netsh advfirewall firewall set rule group=\u0026#34;Remote Volume Management\u0026#34; new enable=yes Netsh advfirewall firewall set rule group=\u0026#34;Windows Firewall Remote Management\u0026#34; new enable=yes Netsh advfirewall firewall set rule group=\u0026#34;Remote Services Management\u0026#34; new enable=yes Netsh advfirewall firewall set rule group=\u0026#34;File and Printer Sharing\u0026#34; new enable=yes Netsh advfirewall firewall set rule group=\u0026#34;Remote Scheduled Tasks Management\u0026#34; new enable=yes Netsh advfirewall firewall set rule group=\u0026#34;Performance Logs and Alerts\u0026#34; new enable=yes Netsh advfirewall firewall set rule group=\u0026#34;Remote Event Log Management\u0026#34; new enable=yes﻿​Netsh advfirewall firewall set rule group=\u0026#34;File and Printer Sharing\u0026#34; new enable=yes Netsh advfirewall firewall set rule group=\u0026#34;Remote Scheduled Tasks Management\u0026#34; new enable=yes Netsh advfirewall firewall set rule group=\u0026#34;Performance Logs and Alerts\u0026#34; new enable=yes Netsh advfirewall firewall set rule group=\u0026#34;Remote Event Log Management\u0026#34; new enable=yes Then install RSAT and start server manager.\nAdd the server by dns / ip address and provide the Administrator user/password in \u0026ldquo;Manage as\u0026hellip;\u0026rdquo; context menu item.\nYou will likely get a \u0026ldquo;Kerberos authentication error\u0026rdquo; listed against the server, but most functions should work fine.\n\u0026ldquo;Computer Management\u0026rdquo; in particular works and gives access to Services, which don\u0026rsquo;t exist on the hyper-v server installation natively.\niex ((New-Object System.Net.WebClient).DownloadString(\u0026#39;https://chocolatey.org/install.ps1\u0026#39;)) refreshenv choco install git -y -params \u0026#39;\u0026#34;/GitAndUnixToolsOnPath\u0026#34;\u0026#39; refreshenv |\niex ((New-Object System.Net.WebClient).DownloadString(\u0026#39;https://chocolatey.org/install.ps1\u0026#39;)) refreshenv choco install git -y -params \u0026#39;\u0026#34;/GitAndUnixToolsOnPath\u0026#34;\u0026#39; refreshenv |\niex ((New-Object System.Net.WebClient).DownloadString(\u0026#39;https://chocolatey.org/install.ps1\u0026#39;)) refreshenv choco install git -y -params \u0026#39;\u0026#34;/GitAndUnixToolsOnPath\u0026#34;\u0026#39; refreshenv |\niex ((New-Object System.Net.WebClient).DownloadString(\u0026#39;https://chocolatey.org/install.ps1\u0026#39;)) refreshenv choco install git -y -params \u0026#39;\u0026#34;/GitAndUnixToolsOnPath\u0026#34;\u0026#39; refreshenv |\niex ((New-Object System.Net.WebClient).DownloadString(\u0026#39;https://chocolatey.org/install.ps1\u0026#39;)) refreshenv choco install git -y -params \u0026#39;\u0026#34;/GitAndUnixToolsOnPath\u0026#34;\u0026#39; refreshenv |\ndocker run -it \u0026ndash;rm microsoft/windowsservercore\ndocker run -it \u0026ndash;rm microsoft/windowsservercore # Should eventually dump you in a new shell dir # Should look like a different system exit﻿​\ndocker run -it \u0026ndash;rm microsoft/windowsservercore # Should eventually dump you in a new shell dir # Should look like a different system exit﻿​\n","permalink":"https://notes.alelec.net/posts/windows-docker-gitlab-ci-runner/","summary":"\u003ch1 id=\"windows-ci-build-node\"\u003eWindows CI Build Node\u003c/h1\u003e\n\u003cp\u003eInstall Hyper V Server 2016 (free perpetual eval licence)\u003c/p\u003e\n\u003cp\u003e\u003ca href=\"https://www.microsoft.com/en-us/evalcenter/evaluate-hyper-v-server-2016\"\u003ehttps://www.microsoft.com/en-us/evalcenter/evaluate-hyper-v-server-2016\u003c/a\u003e\u003c/p\u003e\n\u003cp\u003e\u003ca href=\"https://technet.microsoft.com/hyper-v-server-docs/Hyper-V-Server-2016\"\u003ehttps://technet.microsoft.com/hyper-v-server-docs/Hyper-V-Server-2016\u003c/a\u003e\u003c/p\u003e\n\u003cp\u003e\u003ca href=\"https://blog.docker.com/2016/09/build-your-first-docker-windows-server-container/\"\u003ehttps://blog.docker.com/2016/09/build-your-first-docker-windows-server-container/\u003c/a\u003e\u003c/p\u003e\n\u003cp\u003eInstall on your hardware/vm of choice.\u003c/p\u003e\n\u003ch3 id=\"ovirt--kvm\"\u003eoVirt / KVM\u003c/h3\u003e\n\u003cp\u003eIf you\u0026rsquo;re using oVirt or other KVM based hypervisor for you host, you\u0026rsquo;ll likely want the console viewer application installed on your local machine: \u003ca href=\"https://virt-manager.org/download/sources/virt-viewer/virt-viewer-x64-6.0.msi\"\u003ehttps://virt-manager.org/download/sources/virt-viewer/virt-viewer-x64-6.0.msi\u003c/a\u003e\u003c/p\u003e\n\u003cp\u003eSet up the vm with the disk connected to IDE initially, we can switch it over to faster VirtIO once drivers are installed.\u003c/p\u003e","title":"Windows Docker Gitlab CI Runner"},{"content":"Windows CI Build Node Install Windows Server Core 2019 or Windows 10 (eval licence or full).\nhttps://uupdump.ml/ Can be used to download latest versions.\nHyper V Server 2019 not working as of Feb 2019: https://github.com/MicrosoftDocs/Virtualization-Documentation/issues/945\nhttps://www.microsoft.com/en-us/evalcenter/evaluate-hyper-v-server-2019\nhttps://medium.com/@RealNetwork/direct-download-links-windows-server-2019-datacenter-standard-essentials-hyper-v-server-2019-5f53357eeeac\nhttps://software-download.microsoft.com/download/pr/17763.1.180914-1434.rs5_release_SERVERHYPERCORE_OEM_x64FRE_en-us.iso\nInstall on your hardware/vm of choice.\nSystem Setup Once it\u0026rsquo;s installed you\u0026rsquo;ll see a console on the vm screen. Firstly you\u0026rsquo;ll be asked to set a password, do so with something memorable.\nThere should be a blue menu visible on the console.\nRemote Desktop can be enabled with menu \u0026lsquo;7\u0026rsquo;\nPress \u0026lsquo;8\u0026rsquo; to show Network Settings to see the current IP address. We\u0026rsquo;ll need that and the \u0026ldquo;Computer Name\u0026rdquo; displayed on the home screen below.\nHyperv server 2019 currently has a bug with RDP, not needed on server core: https://social.technet.microsoft.com/Forums/en-US/c9d82adb-5dd5-4e43-878c-2e98e00c2943/hyperv-server-2019-rdp-not-working?forum=winserverhyperv\nEnable-WindowsOptionalFeature -Online -FeatureName Remote-Desktop-Services # If that fails, reboot. If still no good, try this: wget -UseBasicParsing https://github.com/stascorp/rdpwrap/releases/download/v1.6.2/RDPWInst-v1.6.2.msi -Outfile RDPWInst-v1.6.2.msi msiexec.exe /i RDPWInst-v1.6.2.msi The hardware drivers in the VM can now be changed to VirtIO interfaces for best performance.\nRemote desktop on your local machine can now be used to connected to the IP address shown with the username \u0026ldquo;Administrator\u0026rdquo; and the password set earlier. This allows copy/paste to work. oVirt / KVM If you\u0026rsquo;re using oVirt or other KVM based hypervisor for you host, you\u0026rsquo;ll likely want the console viewer application installed on your local machine: https://virt-manager.org/download/sources/virt-viewer/virt-viewer-x64-6.0.msi\nSet up the vm with the disk connected to IDE initially, we can switch it over to faster VirtIO once drivers are installed.\nThe network adapter will need to be set to \u0026ldquo;Dual mode rtl8139, VirtIO\u0026rdquo;\nOnce installed and initial setup completed, ensure the guest tools are installed:\nImport-Module BitsTransfer $url = \u0026#34;https://www.spice-space.org/download/windows/spice-guest-tools/spice-guest-tools-latest.exe\u0026#34; $dest = \u0026#34;spice-guest-tools-latest.exe\u0026#34; Start-BitsTransfer -Source $url -Destination $dest .\\spice-guest-tools-latest.exe The hardware drivers in the VM can now be changed to VirtIO interfaces for best performance.\nInstall FOD There are a bunch of extra features available, installing this package from ISO will provide explorer and a bunch of other tools, make more apps run.\nhttps://medium.com/@RealNetwork/direct-download-links-windows-server-2019-datacenter-standard-essentials-hyper-v-server-2019-5f53357eeeac\nwget https://software-download.microsoft.com/download/pr/17763.1.180914-1434.rs5_release_amd64fre_SERVER-FOD-PACKAGES_OEM_amd64fre_MULTI.iso -Outfile FOD-PACKAGES.iso Mount-DiskImage -ImagePath $pwd\\FOD-PACKAGES.iso # E drive below may need to be changed DISM /Online /Add-Capability /CapabilityName:\u0026#34;ServerCore.AppCompatibility~~~~0.0.1.0\u0026#34; /Source:E: /LimitAccess # Will need to reboot, then can also do this if desired Mount-DiskImage -ImagePath FOD-PACKAGES.iso Dism /online /add-package:E:\u0026#34;Microsoft-Windows-InternetExplorer-Optional-Package~31bf3856ad364e35~amd64~~.cab\u0026#34; Install choco, tools, git Start with choco, then use it to install useful tools and git for windows\nSet-ExecutionPolicy AllSigned iex ((New-Object System.Net.WebClient).DownloadString(\u0026#39;https://chocolatey.org/install.ps1\u0026#39;)) refreshenv choco install git -y -params \u0026#39;\u0026#34;/GitOnlyOnPath\u0026#34;\u0026#39; #choco install -y multicommander # no longer needed with FOD above choco install -y notepad2 # Use notepad2 as replacement for notebad - works with gitlab runner config files choco install -y notepadreplacer # will open wizard, when asked for \u0026#34;Text Editor\u0026#34; path, provide: # C:\\Program Files\\Notepad2\\Notepad2.exe refreshenv﻿​ WSL linux subsystem, including bash:\nEnable-WindowsOptionalFeature -Online -FeatureName Microsoft-Windows-Subsystem-Linux # Reboots Import-Module BitsTransfer $url = \u0026#34;https://aka.ms/wsl-ubuntu-1804\u0026#34; $dest = \u0026#34;c:\\Ubuntu.zip\u0026#34; Start-BitsTransfer -Source $url -Destination $dest Expand-Archive c:\\Ubuntu.zip C:\\Ubuntu # Add to path $userenv = [System.Environment]::GetEnvironmentVariable(\u0026#34;Path\u0026#34;, \u0026#34;User\u0026#34;) [System.Environment]::SetEnvironmentVariable(\u0026#34;PATH\u0026#34;, $userenv + \u0026#34;C:\\Ubuntu\u0026#34;, \u0026#34;User\u0026#34;) # Initialise c:\\Ubuntu\\ubuntu1804.exe # Enable WSL2 Enable-WindowsOptionalFeature -Online -FeatureName VirtualMachinePlatform wsl -l -v wsl --set-default-version 2 Desktop The Hyper-V / server core server desktop is quite sparse, it is easier to use with Cairo Desktop installed: https://cairoshell.com/\nwget -UseBasicParsing \u0026#34;https://github.com/cairoshell/cairoshell/releases/download/v0.3.6693/CairoSetup_64bit.exe\u0026#34; -Outfile CairoSetup_64bit.exe .\\CairoSetup_64bit.exe During install, when selecting components, you will want to enable \u0026ldquo;Advanced users only: Replace Explorer\u0026rdquo;\nOnce Cairo Desktop is installed, the service console wont be automatically openned at login. It can be accessed by openning a cmd prompt and running\nsconfig Installing Docker Until https://gitlab.com/gitlab-org/gitlab-runner/issues/4295 we need to go via a tcp socket\nEnable-WindowsOptionalFeature -online -FeatureName Microsoft-Hyper-V-Management-Powershell -all $ip = \u0026#34;192.168.50.1\u0026#34; New-VMSwitch -Name \u0026#34;Internal vSwitch\u0026#34; -SwitchType \u0026#34;Internal\u0026#34; -Notes \u0026#34;Internal IP used for docker\u0026#34; New-NetIPAddress -IPAddress ${ip} -PrefixLength 24 -InterfaceIndex (Get-NetAdapter -Name \u0026#34;*Internal vSwitch*\u0026#34;).InterfaceIndex Follow: https://www.kauffmann.nl/2019/03/04/how-to-install-docker-on-windows-10-without-hyper-v/\n# Install Windows feature containers $restartNeeded = $false if (!(Get-WindowsOptionalFeature -FeatureName containers -Online).State -eq \u0026#39;Enabled\u0026#39;) { Enable-WindowsOptionalFeature -Online -FeatureName HypervisorPlatform Enable-WindowsOptionalFeature -Online -FeatureName VirtualMachinePlatform Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Hyper-V –All $restartNeeded = (Enable-WindowsOptionalFeature -FeatureName containers -Online –All).RestartNeeded } if (Get-Service docker -ErrorAction SilentlyContinue) { Stop-Service docker } # Download the zip file. $json = Invoke-WebRequest -UseBasicparsing https://download.docker.com/components/engine/windows-server/index.json | ConvertFrom-Json $version = $version = $json.channels.\u0026#39;18.09\u0026#39;.version $url = $json.versions.$version.url $zipfile = Join-Path \u0026#34;$env:USERPROFILE\\Downloads\\\u0026#34; $json.versions.$version.url.Split(\u0026#39;/\u0026#39;)[-1] Import-Module BitsTransfer Start-BitsTransfer -Source $url -Destination $zipfile # Extract the archive. Expand-Archive $zipfile -DestinationPath $Env:ProgramFiles -Force # Modify PATH to persist across sessions. $newPath = [Environment]::GetEnvironmentVariable(\u0026#34;PATH\u0026#34;,[EnvironmentVariableTarget]::Machine) + \u0026#34;;$env:ProgramFiles\\docker\u0026#34; $splittedPath = $newPath -split \u0026#39;;\u0026#39; $cleanedPath = $splittedPath | Sort-Object -Unique $newPath = $cleanedPath -join \u0026#39;;\u0026#39; [Environment]::SetEnvironmentVariable(\u0026#34;PATH\u0026#34;, $newPath, [EnvironmentVariableTarget]::Machine) $env:path = $newPath # Register the Docker daemon as a service. if (!(Get-Service docker -ErrorAction SilentlyContinue)) { # Add new group with access New-LocalGroup -Name \u0026#34;docker\u0026#34; Add-LocalGroupMember -Group \u0026#34;docker\u0026#34; -Member \u0026#34;SYSTEM\u0026#34; #dockerd --exec-opt isolation=process --group docker --register-service # Until https://gitlab.com/gitlab-org/gitlab-runner/issues/4295 $ip=(Get-NetAdapter -Name \u0026#34;*Internal vSwitch*\u0026#34; | Get-NetIPAddress -AddressFamily IPv4).IPAddress dockerd --exec-opt isolation=process --group docker -H tcp://${ip}:2375 -H \u0026#34;npipe://\u0026#34; --register-service New-NetFirewallRule -DisplayName \u0026#34;Allow inbound TCP port 2375 (Docker)\u0026#34; -Direction inbound -LocalPort 2375 -Protocol TCP -Action Allow cmd /c \u0026#34;sc config docker start= delayed-auto\u0026#34; } # Start the Docker service. if ($restartNeeded) { Write-Host \u0026#39;A restart is needed to finish the installation\u0026#39; -ForegroundColor Green If ((Read-Host \u0026#39;Do you want to restart now? [Y/N]\u0026#39;) -eq \u0026#39;Y\u0026#39;) { Restart-Computer } } else { Start-Service docker } If you would like your docker stored on a different drive, change this configuration before pulling any images\nnotepad C:\\ProgramData\\docker\\config\\daemon.json It will ask you to create file, select yes and paste the following content\n{ \u0026#34;graph\u0026#34;: \u0026#34;D:\\\\ProgramData\\\\Docker\u0026#34; } Changing the path as appropriate. Save, exit, then restart the docker service.\nREF: how to write config file from powershell: https://bcthomas.com/2019/02/getting-started-with-linux-containers-on-windows-server-2019/\nFor reference, my previous docker instructions :\nhttps://docs.docker.com/docker-for-windows\nhttps://docs.microsoft.com/en-us/virtualization/windowscontainers/quick-start/quick-start-windows-server\nFrom the powershell prompt:\n# Enable features required (HNS Service) Enable-WindowsOptionalFeature -Online -FeatureName HypervisorPlatform Enable-WindowsOptionalFeature -Online -FeatureName VirtualMachinePlatform Enable-WindowsOptionalFeature -Online -FeatureName containers –All Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Hyper-V –All # worth a try Install-WindowsFeature -Name Containers # Will reboot Set-Service -Name hns -StartupType Automatic Uninstall-WindowsFeature Windows-DefenderInstall-Module -Name DockerMsftProvider -Repository PSGallery -Force # Press Y to continue Install-Package -Name docker -ProviderName DockerMsftProvider # -Update -Force # -RequiredVersion 18.03 # Press A to accept installation from DockerDefault source # This can display an error which can be ignored: \u0026#34;The role, role service, or feature name is not valid: \u0026#39;containers\u0026#39;. The name was not found.\u0026#34; Restart-Computer -Force Verify docker cmd /c \u0026#34;sc config docker start= delayed-auto\u0026#34; cmd /c \u0026#34;sc config docker depend= hns\u0026#34; Start-Service docker docker run -it --rm mcr.microsoft.com/windows/servercore:1809 docker run -it --rm --isolation=hyperv mcr.microsoft.com/windows/servercore:1809 # Will download (big) base image, should eventually dump you in a new shell dir # Should look like a different system exit Powershell download errors Powershell has be giving errors below on some sites, ensure it accepts tls\n[Net.ServicePointManager]::SecurityProtocol = \u0026#34;tls12, tls11, tls\u0026#34; Network Certificate If you\u0026rsquo;re running on a network with custom server certificates (eg. work cert) they can be installed\nwget -UseBasicParsing http://internal.localnet/work-root-ca.crt -Outfile work-root-ca.crt Import-Certificate -FilePath work-root-ca.crt -CertStoreLocation Cert:\\LocalMachine\\Root Gitlab CI runner Install gitlab runner and configure one of the following two setup types:\nGitlab Docker runner # Beta runner with native docker support: https://gitlab.com/andrewleech/gitlab-runner Import-Module BitsTransfer #$url = \u0026#34;https://gitlab.com/andrewleech/gitlab-runner/-/jobs/155104654/artifacts/raw/out/binaries/gitlab-runner-windows-amd64.exe\u0026#34; # beta has windows docker support $url = \u0026#34;https://s3.amazonaws.com/gitlab-runner-downloads/master/binaries/gitlab-runner-windows-amd64.exe\u0026#34; # official now has windows docker support $url = \u0026#34;https://gitlab-runner-downloads.s3.amazonaws.com/latest/binaries/gitlab-runner-windows-amd64.exe\u0026#34; Start-BitsTransfer -Source $url -Destination c:\\windows\\system32\\gitlab-runner.exe # Get registration token from https://gitlab.com/\u0026lt;project settings\u0026gt;/runners $env:REGISTRATION_TOKEN=\u0026#34;abc123\u0026#34; $env:CI_SERVER_URL=\u0026#34;https://gitlab.com\u0026#34; $env:RUNNER_NAME=\u0026#34;WindowsDockerRunner1809\u0026#34; $env:CONFIG_FILE=\u0026#34;C:\\gitlab\\config.toml\u0026#34; $env:REGISTER_LOCKED=\u0026#34;false\u0026#34; $env:RUNNER_EXECUTOR=\u0026#34;docker-windows\u0026#34; $env:RUNNER_TAG_LIST=\u0026#34;docker,windows,1809\u0026#34; $env:RUNNER_SHELL=\u0026#34;powershell\u0026#34; $env:RUNNER_BUILDS_DIR=\u0026#34;c:\\gitlab\\builds\u0026#34; #$env:RUNNER_CACHE_DIR=\u0026#34;c:\\gitlab\\cache\u0026#34; $env:DOCKER_MEMORY=\u0026#34;4g\u0026#34; $env:DOCKER_TLS_VERIFY=\u0026#34;false\u0026#34; #$env:DOCKER_PRIVILEGED=\u0026#34;true\u0026#34; $env:DOCKER_IMAGE=\u0026#34;mcr.microsoft.com/windows/servercore:1809\u0026#34; $env:DOCKER_VOLUMES=\u0026#34;\\\\.\\pipe\\docker_engine\u0026#34; #$env:DOCKER_CACHE_DIR=\u0026#34;c:\\gitlab\\cache\u0026#34; #$env:DOCKER_PULL_POLICY=\u0026#34;if-not-present\u0026#34; #$env:DOCKER_HELPER_IMAGE=\u0026#34;registry.gitlab.com/andrewleech/gitlab-runner/gitlab-runner-helper:win-x86_64-1809-latest\u0026#34; # TODO Switch back to npipe once it works in gitlab (see note above) $ip=(Get-NetAdapter -Name \u0026#34;*Internal vSwitch*\u0026#34; | Get-NetIPAddress -AddressFamily IPv4).IPAddress $env:DOCKER_HOST=\u0026#34;tcp://${ip}:2375\u0026#34; $env:RUNNER_ENV=\u0026#34;DOCKER_HOST=tcp://${ip}:2375\u0026#34; cd \\ mkdir \\gitlab gitlab-runner register --non-interactive # You may want to increase the number of concurrent jobs, if so: notepad c:\\gitlab\\config.toml # Then add/edit the following line to the top of the file (withouth the #) # concurrent = 4 # Save and close # Install the service gitlab-runner install -user .\\LocalSystem --working-directory=\u0026#34;C:\\gitlab\u0026#34; --config=$env:CONFIG_FILE cmd /c \u0026#34;sc.exe config gitlab-runner start= delayed-auto\u0026#34; # edit config.toml, add session_server listen address, then open it in firewall: New-NetFirewallRule -DisplayName \u0026#34;Allow inbound TCP port 8093 (gitlab runner session server)\u0026#34; -Direction inbound -LocalPort 8093 -Protocol TCP -Action Allow Local powershell runner This is useful for building docker images, etc. I haven\u0026rsquo;t got docker-in-docker working on windows yet (haven\u0026rsquo;t really tried recently)\n# Skip the wget if you\u0026#39;ve already installed the docker beta one above Import-Module BitsTransfer $url = \u0026#34;https://gitlab-runner-downloads.s3.amazonaws.com/latest/binaries/gitlab-runner-windows-amd64.exe\u0026#34; $dest = \u0026#34;c:\\windows\\system32\\gitlab-runner.exe\u0026#34; Start-BitsTransfer -Source $url -Destination $dest # To register a shared host shell runner for building docker images etc $REGISTRATION_TOKEN=\u0026#34;\u0026lt;token from https://gitlab.com/admin/runners\u0026gt;\u0026#34; gitlab-runner register --non-interactive --url=\u0026#34;https://gitlab.com\u0026#34; --registration-token=$REGISTRATION_TOKEN --description=\u0026#34;WindowsHostRunner1809\u0026#34; --executor=\u0026#34;shell\u0026#34; --shell=\u0026#34;powershell\u0026#34; --tag-list=\u0026#34;windows,windows_docker_host,powershell,1809\u0026#34; # Install the service, if not already done above gitlab-runner install -user .\\LocalSystem Start-Service gitlab-runner Other Features\u0026hellip; Get-WindowsOptionalFeature -online | ft Enable-WindowsOptionalFeature -Online -FeatureName Random Shutdowns Sometimes the free licence can get out of whack and expires, resulting in the vm starts shutting down every hour.\nThis should be resolved by running\nSlmgr.vbs -rearm Windows Admin Center $cert = (New-SelfSignedCertificate -DnsName \u0026#34;SleakWin\u0026#34; -CertStoreLocation \u0026#34;cert:\\LocalMachine\\My\u0026#34; -NotAfter (Get-Date).AddYears(10)).Thumbprint | Out-String # TODO these params settings don\u0026#39;t appear to work # choco install -y windows-admin-center --params \u0026#34;/Thumbprint:$cert /Port:443\u0026#34; $args = \u0026#34;\u0026#34;\u0026#34;/Thumbprint:\u0026#34; + $cert + \u0026#34; /Port:443\u0026#34;\u0026#34;\u0026#34; echo $args echo $cert choco install -y windows-admin-center --params \u0026#34;\u0026#39;/Thumbprint:\u0026lt;copy the thumbnail printed above\u0026gt; /Port:443\u0026#39;\u0026#34; Restart-Computer -Force The Hyper-V Server can be remotely administered with MS Remote Server Administration Tools (RSAT): https://www.microsoft.com/en-au/download/details.aspx?id=45520 To enable this, the following firewall ports need to be opened on the hyperv server:\nSet-NetFirewallRule -DisplayGroup \u0026#39;Windows Management Instrumentation (WMI)\u0026#39; -Enabled true -PassThru Netsh advfirewall firewall set rule group=\u0026#34;Remote Volume Management\u0026#34; new enable=yes Netsh advfirewall firewall set rule group=\u0026#34;Windows Firewall Remote Management\u0026#34; new enable=yes Netsh advfirewall firewall set rule group=\u0026#34;Remote Services Management\u0026#34; new enable=yes Netsh advfirewall firewall set rule group=\u0026#34;File and Printer Sharing\u0026#34; new enable=yes Netsh advfirewall firewall set rule group=\u0026#34;Remote Scheduled Tasks Management\u0026#34; new enable=yes Netsh advfirewall firewall set rule group=\u0026#34;Performance Logs and Alerts\u0026#34; new enable=yes Netsh advfirewall firewall set rule group=\u0026#34;Remote Event Log Management\u0026#34; new enable=yes﻿​Netsh advfirewall firewall set rule group=\u0026#34;File and Printer Sharing\u0026#34; new enable=yes Netsh advfirewall firewall set rule group=\u0026#34;Remote Scheduled Tasks Management\u0026#34; new enable=yes Netsh advfirewall firewall set rule group=\u0026#34;Performance Logs and Alerts\u0026#34; new enable=yes Netsh advfirewall firewall set rule group=\u0026#34;Remote Event Log Management\u0026#34; new enable=yes Then install RSAT and start server manager.\nAdd the server by dns / ip address and provide the Administrator user/password in \u0026ldquo;Manage as\u0026hellip;\u0026rdquo; context menu item.\nYou will likely get a \u0026ldquo;Kerberos authentication error\u0026rdquo; listed against the server, but most functions should work fine.\n\u0026ldquo;Computer Management\u0026rdquo; in particular works and gives access to Services, which don\u0026rsquo;t exist on the hyper-v server installation natively.\nsconfig WSL linux subsystem, including bash:\nEnable-WindowsOptionalFeature -Online -FeatureName Microsoft-Windows-Subsystem-Linux Random Shutdowns Sometimes the free licence can get out of whack and expires, resulting in the vm starts shutting down every hour.\nThis should be resolved by running\n12Slmgr.vbs -rearm .appveyor.yml ","permalink":"https://notes.alelec.net/posts/windows-docker-gitlab-ci-runner-2019/","summary":"\u003ch1 id=\"windows-ci-build-node\"\u003eWindows CI Build Node\u003c/h1\u003e\n\u003cp\u003eInstall Windows Server Core 2019 or Windows 10 (eval licence or full).\u003c/p\u003e\n\u003cp\u003e\u003ca href=\"https://uupdump.ml/\"\u003ehttps://uupdump.ml/\u003c/a\u003e Can be used to download latest versions.\u003c/p\u003e\n\u003cp\u003e \u003c/p\u003e\n\u003cp\u003eHyper V Server 2019 not working as of Feb 2019: https://github.com/MicrosoftDocs/Virtualization-Documentation/issues/945\u003c/p\u003e\n\u003cp\u003e\u003ca href=\"https://www.microsoft.com/en-us/evalcenter/evaluate-hyper-v-server-2016\"\u003ehttps://www.microsoft.com/en-us/evalcenter/evaluate-hyper-v-server-201\u003c/a\u003e9\u003c/p\u003e\n\u003cp\u003e\u003ca href=\"https://medium.com/@RealNetwork/direct-download-links-windows-server-2019-datacenter-standard-essentials-hyper-v-server-2019-5f53357eeeac\"\u003ehttps://medium.com/@RealNetwork/direct-download-links-windows-server-2019-datacenter-standard-essentials-hyper-v-server-2019-5f53357eeeac\u003c/a\u003e\u003c/p\u003e\n\u003cp\u003e\u003ca href=\"https://software-download.microsoft.com/download/pr/17763.1.180914-1434.rs5_release_SERVERHYPERCORE_OEM_x64FRE_en-us.iso\"\u003ehttps://software-download.microsoft.com/download/pr/17763.1.180914-1434.rs5_release_SERVERHYPERCORE_OEM_x64FRE_en-us.iso\u003c/a\u003e\u003c/p\u003e\n\u003cp\u003e \u003c/p\u003e\n\u003cp\u003e Install on your hardware/vm of choice.\u003c/p\u003e\n\u003cp\u003e \u003c/p\u003e\n\u003ch3 id=\"system-setup\"\u003eSystem Setup\u003c/h3\u003e\n\u003cp\u003eOnce it\u0026rsquo;s installed you\u0026rsquo;ll see a console on the vm screen. Firstly you\u0026rsquo;ll be asked to set a password, do so with something memorable.\u003c/p\u003e","title":"Windows Docker Gitlab CI Runner (2019)"}]