Skip to content

Instantly share code, notes, and snippets.

View josiahhaswell's full-sized avatar

Josiah Haswell josiahhaswell

  • https://sunshower.io
  • Ft. Collins
View GitHub Profile
static final long[] FIB_ROOT = new long[]
{
1, 1, 1, 0
};
/**
* @param l a positive long such that L < Long.MAX_VALUE (2^64 -1)
* @return
*/
public static long[] computeFibonacciUntil(long l) {
assert l >= 0;
@AireUITest
@Navigate("zephyr/management/modules/list")
@Routes(scanClassPackage = ModuleGrid.class)
class ModuleGridTest {
@ViewTest
void ensureStoppingAModuleThroughTheStopButtonStopsTheModule(
@Select("vaadin-vertical-layout > aire-drawer")
Drawer drawer, @Context TestContext context, @Autowired Zephyr zephyr) {
@josiahhaswell
josiahhaswell / configuration.auto.tfvars
Created February 22, 2021 22:04
Node DNS Configurations
cluster_nodes = {
etcd_nodes = [
{
name = "etcd-1"
ip = "192.168.1.5"
},
{
name = "etcd-2"
ip = "192.168.1.6"
@josiahhaswell
josiahhaswell / configuration.auto.tfvars
Created February 22, 2021 22:03
DNS server configuration
dns_server = {
// replace with your zone-name (configured above)
zone = "sunshower.cloud." // note the trailing period here--it's mandatory
// replace with your DNS server's IP
server = "192.168.1.2"
}
// this generates the DNS configuration for `kubernetes.sunshower.cloud`
api_dns = "kubernetes"
api_domain = "sunshower.cloud"
@josiahhaswell
josiahhaswell / main.tf
Created February 22, 2021 22:02
main.tf DNS module definition
/**
Create DNS entries for virtual machines
*/
module "dns_configuration" {
for_each = var.cluster_nodes
source = "./dns"
dns_server = var.dns_server
hosts = each.value
api_dns = var.api_server
api_domain = var.domain
@josiahhaswell
josiahhaswell / dns-config.tf
Created February 22, 2021 22:00
main.tf DNS provider configuration
provider "dns" {
update {
server = var.dns_server.server
}
}
@josiahhaswell
josiahhaswell / main.tf
Created February 22, 2021 21:58
main.tf/terraform config
terraform {
required_version = ">=0.14"
required_providers {
dns = {
source = "hashicorp/dns"
version = "3.0.1"
}
}
}
@josiahhaswell
josiahhaswell / variables.tf
Created February 22, 2021 21:57
structural variables
variable "A" {
type = object({
name = string
ip = string
})
}
variable "B" {
type = object({
name = string
@josiahhaswell
josiahhaswell / main.tf
Created February 22, 2021 21:54
dns/main.tf
terraform {
required_providers {
dns = {
source = "hashicorp/dns"
}
}
}
/**
- uses: actions/upload-artifact@v2
with:
name: zephyr-main
path: zephyr-main/build/distributions/*.zip
- name: get commit message
run: echo ::set-env name=commitmsg::$(git log --format=%B -n 1 ${{ github.event.after }})
- name: Perform Release
id: create_release