Skip to content

Instantly share code, notes, and snippets.

View scross01's full-sized avatar

Stephen Cross scross01

  • Oracle
  • Ottawa, Canada
View GitHub Profile
Verifying my Blockstack ID is secured with the address 1PADtEN4QmxsUt5XVHoeVbdczZKYYVwrwa https://explorer.blockstack.org/address/1PADtEN4QmxsUt5XVHoeVbdczZKYYVwrwa
@scross01
scross01 / influxdb.conf
Created February 18, 2019 15:41
asuswrt syslog-ng config to forward logs to influxdb
# /opt/etc/syslog-ng.d/influxdb.conf
destination influxdb {
http(
url("http://influxdb.home.lan:8086/write?db=home_network")
method("POST")
user("username")
password("password")
headers("Content-type: application/octet-stream")
body("syslog,appname=${PROGRAM},facility=${FACILITY},host=${HOST},hostname=${HOST},severity=${LEVEL} facility_code=${FACILITY_NUM}i,message=\"${MESSAGE}\",severity_code=${LEVEL_NUM}i,procid=\"${PID}\",timestamp=${UNIXTIME}${USEC}000i,version=1i")
@scross01
scross01 / oci-windows-instance-with-iscsi-attachment.tf
Last active September 28, 2020 11:46
Oracle Cloud Infrastructure ISCSI Block Volume Attachment Example for Windows Server 2016
variable "tenancy_ocid" {}
variable "user_ocid" {}
variable "fingerprint" {}
variable "private_key_path" {}
variable "compartment_ocid" {}
variable "region" {}
variable "subnet" {}
variable "ad" {
default = 0
@scross01
scross01 / autonomous_linux_7.7.tf
Last active January 26, 2020 17:46
Oracle Cloud Infrastructure (OCI) Terraform data sources to find base OS OCIDs https://docs.cloud.oracle.com/iaas/images/
data "oci_core_images" "autonomous_linux" {
compartment_id = "${var.tenancy_ocid}"
operating_system = "Oracle Autonomous Linux"
operating_system_version = "7.7"
# e.g. Oracle-Autonomous-Linux-7.7-2019.12-0"
filter {
name = "display_name"
values = ["^Oracle-Autonomous-Linux-([\\.0-9]+)-([\\.0-9-]+)$"]
resource "opc_compute_ip_network" "ipnet1" {
name = "ipnet1"
ip_address_prefix = "192.168.4.0/24"
}
resource "opc_compute_storage_volume" "boot" {
size = "12"
name = "boot"
bootable = true
image_list = "/oracle/public/OL_7.2_UEKR4_x86_64"
@scross01
scross01 / example-instance.tf
Last active January 5, 2018 15:23
Terraform and Oracle Cloud Infrastructure Classic Orchestrations - Example 2
resource "opc_compute_instance" "MyInstance" {
name = "vm-1"
shape = "oc3"
boot_order = [ 1 ]
label = "vm-1"
networking_info {
index = 0
shared_network = true
seclists = [ "${opc_compute_security_list.wlsadmin_seclist.name}" ]
@scross01
scross01 / example-instance-orchestraion-plan.json
Last active January 5, 2018 15:21
Terraform and Oracle Cloud Infrastructure Classic Orchestrations
{
"name": "/Compute-mydomain/user@example/example-instance-orchestraion",
"description": "Example Instance Orchesrtation",
"desired_state": "active",
"objects":
[
{
"label": "MyInstance",
"type": "Instance",
"description": "My instance",
@scross01
scross01 / oci-linux-instance-cloud-init.tf
Last active April 23, 2023 19:55
Oracle Cloud Infrastructure instance with Terraform cloud-init user_data
data "template_file" "cloud-config" {
template = <<YAML
#cloud-config
runcmd:
- echo 'This instance was provisioned by Terraform.' >> /etc/motd
YAML
}
resource "oci_core_instance" "example" {
count = 1
@scross01
scross01 / oci-linux-instance-remote-exec.tf
Last active September 27, 2022 20:52
Oracle Cloud Infrastructure Instance with Terraform remote-exec Provisioner
resource "oci_core_instance" "example" {
compartment_id = "${var.compartment_ocid}"
availability_domain = "${var.availability_domain}"
subnet_id = "${var.subnet_ocid}"
display_name = "example"
image = "${lookup(data.oci_core_images.image-list.images[0], "id")}"
shape = "VM.Standard1.1"
metadata = {
ssh_authorized_keys = "${file(var.ssh_public_key_file)}"
@scross01
scross01 / oci-classic-storage.cyberduckprofile
Last active October 30, 2017 19:54
Oracle Cloud Infrastructure Storage Classic Cyberduck Profile
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Protocol</key>
<string>swift</string>
<key>Vendor</key>
<string>oracle</string>
<key>Description</key>
<string>Oracle Cloud Infrastructure - Storage Classic</string>