merge main

This commit is contained in:
John Bowdre 2022-08-20 12:35:49 -05:00
commit 3a9b60d084
7 changed files with 44 additions and 16 deletions

View file

@ -1,7 +1,7 @@
---
title: "Gitea: Ultralight Self-Hosted Git Server" # Title of the blog post.
date: 2022-07-22 # Date of post creation.
# lastmod: 2022-07-04T14:05:02-05:00 # Date when last modified
lastmod: 2022-07-27
description: "Deploying the lightweight Gitea Git server on Oracle Cloud's free Ampere Compute."
featured: false # Sets if post is a featured post, making appear on the home page side bar.
draft: false # Sets whether to render this page. Draft of true will not be rendered.
@ -456,7 +456,7 @@ And after just a few moments, all the content from my GitHub repo shows up in my
![Mirrored repo](mirrored_repo.png)
You might noticed that I unchecked the *Make Repository Private* option for this one, so feel free to browse the mirrored repo at https://git.bowdre.net/john/vrealize if you'd like to check out Gitea for yourself.
You might noticed that I unchecked the *Make Repository Private* option for this one, so feel free to browse the mirrored repo at https://git.bowdre.net/vPotato/vrealize if you'd like to check out Gitea for yourself.
#### Create a new repo
The real point of this whole exercise was to sync my Obsidian vault to a Git server under my control, so it's time to create a place for that content to live. I'll go to the **+** menu again but this time select **New Repository**, and then enter the required information:

View file

@ -1,6 +1,7 @@
---
series: vRA8
date: "2021-02-22T08:34:30Z"
lastmod: 2022-07-25
thumbnail: 7_QI-Ti8g.png
usePageBundles: true
tags:
@ -119,9 +120,13 @@ We should also go ahead and create a Nameserver set so that phpIPAM will be able
Okay, we're finally ready to start entering our subnets at **Administration > IP related management > Subnets**. For each one, I entered the Subnet in CIDR format, gave it a useful description, and associated it with my `Lab` section. I expanded the *VLAN* dropdown and used the *Add new VLAN* option to enter the corresponding VLAN information, and also selected the Nameserver I had just created.
![Entering the first subnet](-PHf9oUyM.png)
I also enabled the options *Mark as pool*, *Check hosts status*, *Discover new hosts*, and *Resolve DNS names*.
I also enabled the options ~~*Mark as pool*~~, *Check hosts status*, *Discover new hosts*, and *Resolve DNS names*.
![Subnet options](SR7oD0jsG.png)
{{% notice info "Update" %}}
Since releasing this integration, I've learned that phpIPAM intends for the `isPool` field to identify networks where the entire range (including the subnet and broadcast addresses) are available for assignment. As a result, I no longer recommend using that field. Instead, consider [creating a custom field](https://github.com/jbowdre/phpIPAM-for-vRA8/blob/main/docs/custom_field.md) for tagging networks for vRA availability.
{{% /notice %}}
I then used the *Scan subnets for new hosts* button to run a discovery scan against the new subnet.
![Scanning for new hosts](4WQ8HWJ2N.png)
@ -287,6 +292,10 @@ You'll notice that the form includes fields for Username, Password, and Hostname
}
}
```
{{% notice info "Update" %}}
Check out the [source on GitHub](https://github.com/jbowdre/phpIPAM-for-vRA8/blob/main/src/main/resources/endpoint-schema.json) to see how I adjusted the schema to support custom field input.
{{% /notice %}}
We've now got the framework in place so let's move on to the first operation we'll need to write. Each operation has its own subfolder under `./src/main/python/`, and each contains (among other things) a `requirements.txt` file which will tell Maven what modules need to be imported and a `source.py` file which is where the magic happens.
### Step 5: 'Validate Endpoint' action
@ -418,6 +427,23 @@ subnets = subnets.json()['data']
```
I decided to add the extra `filter_by=isPool&filter_value=1` argument to the query so that it will only return subnets marked as a pool in phpIPAM. This way I can use phpIPAM for monitoring address usage on a much larger set of subnets while only presenting a handful of those to vRA.
{{% notice info "Update" %}}
I now filter for networks identified by the designated custom field like so:
```python
# Request list of subnets
subnet_uri = f'{uri}/subnets/'
if enableFilter == "true":
queryFilter = f'filter_by={filterField}&filter_value={filterValue}'
logging.info(f"Searching for subnets matching filter: {queryFilter}")
else:
queryFilter = ''
logging.info(f"Searching for all known subnets")
ipRanges = []
subnets = requests.get(f'{subnet_uri}?{queryFilter}', headers=token, verify=cert)
subnets = subnets.json()['data']
```
{{% /notice %}}
Now is a good time to consult [that white paper](https://docs.vmware.com/en/VMware-Cloud-services/1.0/ipam_integration_contract_reqs.pdf) to confirm what fields I'll need to return to vRA. That lets me know that I'll need to return `ipRanges` which is a list of `IpRange` objects. `IpRange` requires `id`, `name`, `startIPAddress`, `endIPAddress`, `ipVersion`, and `subnetPrefixLength` properties. It can also accept `description`, `gatewayAddress`, and `dnsServerAddresses` properties, among others. Some of these properties are returned directly by the phpIPAM API, but others will need to be computed on the fly.
For instance, these are pretty direct matches:

View file

@ -1,7 +1,7 @@
---
title: "Removing and Recreating vCLS VMs" # Title of the blog post.
date: 2022-07-24
# lastmod: 2022-07-23T16:25:05-05:00 # Date when last modified
lastmod: 2022-07-25 # Date when last modified
description: "How to remove and (optionally) recreate the vSphere Clustering Services VMs" # Description used for search engine.
featured: false # Sets if post is a featured post, making appear on the home page side bar.
draft: false # Sets whether to render this page. Draft of true will not be rendered.
@ -32,6 +32,10 @@ That's very cool, particularly in large continent-spanning environments or those
Fortunately there's a somewhat-hidden way to disable (and re-enable) vCLS on a per-cluster basis, and it's easy to do once you know the trick. This can help if you want to permanently disable vCLS (like in a lab environment) or if you just need to turn it off and on again[^off-and-on] to clean up and redeploy uncooperative agent VMs.
{{% notice warning "Proceed at your own risk" %}}
Disabling vCLS will break DRS, and could have other unintended side effects. Don't do this in prod if you can avoid it.
{{% /notice %}}
[^off-and-on]: ![](off-and-on.gif)
### Find the cluster's domain ID

View file

@ -38,4 +38,7 @@ other = "Type to search"
other = "Technology keeps moving but this post has not."
[old_content_note]
other = "What you're about to read hasn't been updated in more than a year. The information may be out of date. Drop a comment below if you find something that needs updating."
other = "What you're about to read hasn't been updated in more than a year. The information may be out of date. Drop a comment below if you find something that needs updating."
[analytics_with]
other = "Privacy-friendly analytics with"

View file

@ -8,7 +8,9 @@
<footer class="footer">
<div class="footer_inner wrap pale">
<img src='{{ absURL (default $defaultFooterLogo $s.footerLogo) }}' class="icon icon_2 transparent" alt="{{ $t }}">
<p>{{ T "copyright" | markdownify }}{{ with $s.since }}&nbsp;{{ . }}-{{ end }}&nbsp;<span class="year"></span>&nbsp;{{ $t }}<a rel="me" href="https://counter.social/@john_b">.</a> {{ T "all_rights" | markdownify }}. {{ T "powered_by" | markdownify }} <a href="https://gohugo.io/">Hugo</a>, <a href="https://github.com/chipzoller/hugo-clarity">Hugo Clarity theme</a>, {{ T "and" | markdownify }} <a href="https://www.netlify.com/">Netlify</a>. <a href="https://github.com/jbowdre/virtuallypotato">{{ T "view_source" | markdownify }}</a>.</p>
<p>{{ T "copyright" | markdownify }}{{ with $s.since }}&nbsp;{{ . }}-{{ end }}&nbsp;<span class="year"></span>&nbsp;{{ $t }}<a rel="me" href="https://counter.social/@john_b">.</a> {{ T "all_rights" | markdownify }}.
<br>{{ T "powered_by" | markdownify }} <a href="https://gohugo.io/">Hugo</a>, <a href="https://github.com/chipzoller/hugo-clarity">Hugo Clarity theme</a>, {{ T "and" | markdownify }} <a href="https://www.netlify.com/">Netlify</a>. {{ T "analytics_with" | markdownify }} <a href="https://withcabin.com/privacy/virtuallypotato.com">Cabin</a>.
<br><a href="https://github.com/jbowdre/virtuallypotato">{{ T "view_source" | markdownify }}</a>.</p>
{{- partialCached "top" .}}
</div>
</footer>

View file

@ -1,9 +1,2 @@
<!-- Global site tag (gtag.js) - Google Analytics -->
<script async src="https://www.googletagmanager.com/gtag/js?id=G-9D6ZPFJ69V"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', 'G-9D6ZPFJ69V');
</script>
<!-- Cabin Analytics -->
<script async defer src="https://scripts.withcabin.com/hello.js"></script>

@ -1 +1 @@
Subproject commit 69751d47e52293c22100bdd297679dacb9f4e9e3
Subproject commit 5179510a03eac2aac855a4d9511ad3a589d3bc6c