<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom">
    <title>Tharp.io</title>
    <link href="https://tharp.io//" />
    <link type="application/atom+xml" rel="self" href="https://tharp.io/feed.atom" />
    <updated>2023-05-18T20:23:28+00:00</updated>
    <id>https://tharp.io/feed.atom</id>
    <author>
        <name>Daniel Tharp</name>
    </author>
                <entry>
    <id>https://tharp.io/centrify-transport-layer-failed</id>
    <link type="text/html" rel="alternate" href="https://tharp.io/centrify-transport-layer-failed" />
    <title>Fixing &quot;The connection transport layer failed&quot; in Centrify</title>
    <published>2022-12-12T00:00:00+00:00</published>
    <updated>2022-12-12T00:00:00+00:00</updated>
    <author>
        <name>Daniel Tharp</name>
    </author>
    <summary type="html">What would normally be a very simple remote desktop error to troubleshoot is muddied a bit by 
Centrify, who brokers the connection to the target servers. Someone was trying to
connect and got this fun error:



Transport-layer issues might have you......</summary>
    <content type="html"><![CDATA[
        <p>What would normally be a very simple remote desktop error to troubleshoot is muddied a bit by 
<a href="https://delinea.com/centrify">Centrify</a>, who brokers the connection to the target servers. Someone was trying to
connect and got this fun error:</p>

<pre><code>Failed to login to the target system. Reason: RDP Error (0x2000D) [ERRCONNECT_CONNECT_TRANSPORT_FAILED]: The connection
transport layer failed..

Press any key to close the window
</code></pre>

<p>Transport-layer issues might have you looking at cipher suites and stuff, but this user was able to connect to other
servers fine, so permissions seemed like the most likely thing. And that's indeed all it was, he wasn't in a Windows 
security group with permissions to connect to the server. Normally you'd get a clean "Access Denied" message from 
Windows but, since Centrify is in the middle, it didn't do a great job relaying that message back to us.</p>
    ]]></content>
</entry>
            <entry>
    <id>https://tharp.io/wrong-region</id>
    <link type="text/html" rel="alternate" href="https://tharp.io/wrong-region" />
    <title>Fixing &quot;The specified custom plugin is for a different region. Please try the request in [region]&quot;</title>
    <published>2022-12-09T00:00:00+00:00</published>
    <updated>2022-12-09T00:00:00+00:00</updated>
    <author>
        <name>Daniel Tharp</name>
    </author>
    <summary type="html">I&#039;m still getting used to certain quirks and nuances of a new job, and in some recent work on moving an AWS MSK cluster 
to multi-region, I was also working on setting up MirrorMaker 2. In trying to run terraform to import some stuff I made 
via the......</summary>
    <content type="html"><![CDATA[
        <p>I'm still getting used to certain quirks and nuances of a new job, and in some recent work on moving an AWS MSK cluster 
to multi-region, I was also working on setting up MirrorMaker 2. In trying to run terraform to import some stuff I made 
via the console, I got a fun error message back:</p>

<pre><code>BadRequestException: The specified custom plugin is for a different region. Please try the request in [region]. 
</code></pre>

<p>What was weird here, was that I had a provider block set for this region already, and this resource was making use of it.</p>

<p>This was actually a simple thing, it just wasn't immediately intuitive. Terraform was actually being called from behind 
<code>aws-vault</code>, and that makes use of your <code>~/.aws/config</code> block. Specifically, it makes use of the profiles in that file,
and completely ignores anything in the <code>[default]</code> section.</p>

<p>So, fixing this in my case was as simple as:</p>

<pre><code>aws configure set region us-west-2 --profile [profile]
</code></pre>

<p>No flushing of credentials were needed or anything like that, it just worked after that.</p>

<p>Hope that saves you a few minutes.</p>
    ]]></content>
</entry>
            <entry>
    <id>https://tharp.io/serverless</id>
    <link type="text/html" rel="alternate" href="https://tharp.io/serverless" />
    <title>Serverless Development Pt. 1</title>
    <published>2021-10-25T00:00:00+00:00</published>
    <updated>2021-10-25T00:00:00+00:00</updated>
    <author>
        <name>Daniel Tharp</name>
    </author>
    <summary type="html">When I decided to launch this site, I didn&#039;t have much in the way of requirements. In fact, I really only had one: that the site showcase technical proficiency in multiple disciplines. One way I thought I could show that was by making this joint......</summary>
    <content type="html"><![CDATA[
        <p>When I decided to launch this site, I didn't have much in the way of requirements. In fact, I really only had one: that the site showcase technical proficiency in multiple disciplines. One way I thought I could show that was by making this joint serverless.</p>

<p><em>Serverless</em> itself is a bit of a buzzword much like the cloud itself was a decade ago. Let's get on the same page on what the definition is. For an application to be serverless:</p>

<ul>
<li>The resources to run the application are provisioned just in time to run the application.</li>
<li>When not being actively run, the resources should be released automatically.</li>
<li>The application owner should not be billed for compute when the application is not running or warming up to run.</li>
<li>There is both resiliency and scalability in the serverless application through the sheer number of physical servers capable of running the workload.</li>
</ul>

<p>For me, these are all very appealing things. In fact for most folks they're the sort of things you really want. I don't expect this site to get all that much traffic outside of those moments where it's linked by someone to some social media site. As such, I don't want to pay for the privilege of having a web server accept traffic when there's no traffic to accept.</p>

<p>So what are the tradeoffs? It sounds great, right? Why not just run everything this way? For individuals and smaller companies with low public visibility, you honestly probably <em>should</em> run everything serverless when you can. Some services are paid by request/invocation, some are paid per second (or fraction of a second) that the application is running, and some combine the two charges. In any event, you're only paying for the resources used to fulfill the request.</p>

<p>This cuts both ways, though. If you take a classic Function-as-a-service provider like AWS Lambda, you have a cost per invocation, as well as a cost for compute that is calculated as "per GB-sec" (which is one of my favorite units of measurement ever). But you've also got the costs for any data transfer your application might incur, and possibly another charge for whatever invoked the function, whether that's API Gateway, SQS, SNS, or one of the many other services you can hook to Lambda via EventBridge. If your Lambda needs to access other resources in your AWS account you might have a charge for a VPC endpoint. This is all still within the confines of only paying for the resources needed to fulfill the request, even if it ends up touching a dozen or more different systems to do so.</p>

<p>You see where I'm going with this? The costs can rack up beyond your initial forecast of just running the application, and for large companies or high-usage applications, it's generally far more expensive to run things this way, and you're left to figure out the business of resiliency and scaling for yourself.</p>

<p>For this site, I've been able to mitigate a ton of those charges by taking an alternative approach to the deployment and management of the application: This site is completely static. Everything you see and interact with is simple HTML, CSS, and JavaScript. The site is built before deployment, using PHP and Node, and the resulting static files are all that are pushed to the cloud.</p>

<p>This has a number of advantages and a few drawbacks as well. The advantages are numerous, but two in particular made it a very compelling choice for me. A static site has a small, bordering on nonexistent, security footprint. There's nothing to hack, there's no backend to break into, there are no customer records to steal, in fact there's nothing at all on this site that isn't already publicly available through the <a href="https://github.com/danieltharp/io">GitHub repo</a> that powers it. The other advantage ties closely to the first, that there is no backend. That removes a huge amount of complexity from the equation, not having to worry about a database provider or a CMS-like backend to manage state.</p>

<p>As far as drawbacks, it's a bit more complex to operate a static site. Articles are written in Markdown. Configuration is through writing code, PHP in this case. And it requires a certain amount of background knowledge of the various moving parts to deploying a website, particularly if you want the site to update on-the-fly.</p>

<p>In Part 2, I'll get into the architecture of this site specifically, from DNS request to HTTPS response, utilizing Route 53, CloudFront, and S3. We'll also cover the CI/CD aspect of the site, and how it's fully GitOps driven, making use of GitHub Actions, in Part 3. Finally, Part 4 will have us go back and manage the infrastructure as code, utilizing Terraform. At the end of this, your fixed costs to run the website are the charges accrued for storing the assets which, this site being under 1 MB, actually rounds down to $0.00 on your AWS bill, as well as your domain if you have one.</p>
    ]]></content>
</entry>
            <entry>
    <id>https://tharp.io/welcome</id>
    <link type="text/html" rel="alternate" href="https://tharp.io/welcome" />
    <title>Welcome</title>
    <published>2021-10-17T00:00:00+00:00</published>
    <updated>2021-10-17T00:00:00+00:00</updated>
    <author>
        <name>Daniel Tharp</name>
    </author>
    <summary type="html">Welcome to tharp.io, a site that I&#039;ve put together as a technical showcase of various neat things you can do with AWS as well as the home of various articles I might write about various facets of modern computing. Articles might cover...


AWS and cloud......</summary>
    <content type="html"><![CDATA[
        <p>Welcome to tharp.io, a site that I've put together as a technical showcase of various neat things you can do with AWS as well as the home of various articles I might write about various facets of modern computing. Articles might cover...</p>

<ul>
<li>AWS and cloud computing principles (<a href="/categories/aws"><code>aws</code></a>, <a href="/categories/cloud"><code>cloud</code></a>)</li>
<li>Terraform and infrastructure-as-code concepts (<a href="/categories/terraform"><code>terraform</code></a>, <a href="/categories/iac"><code>iac</code></a>)</li>
<li>DevOps, GitOps, and other automation techniques (<a href="/categories/automation"><code>automation</code></a>)</li>
<li>Database Engineering Principles (<a href="/categories/dba"><code>dba</code></a>)</li>
<li>Site Reliability Engineering (<a href="/categories/sre"><code>sre</code></a>)</li>
<li>Chaos Engineering (<a href="/categories/chaos"><code>chaos</code></a>)</li>
<li>Docker and Kubernetes (<a href="/categories/docker"><code>docker</code></a>, <a href="/categories/k8s"><code>k8s</code></a>)</li>
<li>One of any number of languages I use to various extents:

<ul>
<li><a href="/categories/php"><code>php</code></a></li>
<li><a href="/categories/python"><code>python</code></a></li>
<li><a href="/categories/powershell"><code>powershell</code></a></li>
<li><a href="/categories/bash"><code>bash</code></a>, <a href="/categories/zsh"><code>zsh</code></a></li>
<li><a href="/categories/c-sharp"><code>c-sharp</code></a></li>
<li><a href="/categories/golang"><code>golang</code></a></li>
<li><a href="/categories/rust"><code>rust</code></a></li>
<li><a href="/categories/julia"><code>julia</code></a></li>
</ul></li>
<li>Windows or Linux system administration (<a href="/categories/sysadmin"><code>sysadmin</code></a>)</li>
<li>Free Open Source Software and getting involved (<a href="/categories/foss"><code>foss</code></a>)</li>
<li>Tips for putting your best foot forward in your work (<a href="/categories/soft-skills"><code>soft-skills</code></a>)</li>
<li>Other generally nerd-leaning facets of my day-to-day (<a href="/categories/misc"><code>misc</code></a>)</li>
</ul>
    ]]></content>
</entry>
    </feed>
