Skip to content

Instantly share code, notes, and snippets.

@mdrobnak
mdrobnak / main.tf
Created January 15, 2019 06:49
Multiple instances with 2 EBS volumes each
variable "count" {}
resource "aws_instance" "server" {
ami = "ami-7ea88d1b"
instance_type = "t2.micro"
key_name = "normal"
count = "${var.count}"
}
resource "aws_ebs_volume" "volume1" {
+--------+----------+----------------+-------------------------+------------+------------+---------+
| name | messages | messages_ready | messages_unacknowledged | recv_oct | send_oct | tracing |
+--------+----------+----------------+-------------------------+------------+------------+---------+
root@01:/var/log/sensu# while [ 1 ]; do rabbitmqadmin list vhosts|grep /sensu; sleep 5; done
| /sensu | 0 | 0 | 0 | 5432411495 | 5110795549 | False |
| /sensu | 28 | 0 | 28 | 5433741517 | 5112136979 | False |
| /sensu | 3609 | 3509 | 100 | 5436976840 | 5113540934 | False |
| /sensu | 8660 | 8604 | 56 | 5441893160 | 5117526342 | False |
| /sensu | 1541 | 1441 | 100 | 5443647210 | 5121981946 | False |
| /sensu | 0 | 0 | 0 | 5444910058 | 5124048625 | False |
[root@headnode (fra1) ~]# sdcadm insts
INSTANCE SERVICE HOSTNAME VERSION ALIAS
331007fe-2285-4c60-9e49-730cbcbb2d70 adminui headnode master-20150901T223726Z-g1be2057 adminui0
339919d8-8d76-4451-a023-f17f875577a9 amon headnode release-20150820-20150820T072155Z-gd78d824 amon0
bf2efaae-a107-49cc-b828-73ce65930244 amonredis headnode release-20150820-20150820T073805Z-g4bbca77 amonredis0
b50963c8-8f21-4057-954e-9d632584dc08 assets headnode release-20150820-20150820T073742Z-g7c6c02e assets0
edfa70b0-41ab-4805-81cc-22db0e69550b binder headnode release-20150820-20150820T073457Z-gba090a8 binder0
0b6ac5eb-c5cd-4d62-846c-97ce07102b82 ca headnode release-20150820-20150820T073706Z-gb775d2d ca0
429c2282-8796-41d1-9482-fcc8b28f0914 cloudapi headnode master-20150901T015921Z-ga47c8f7 cloudapi0
e17e18c9-691e-461e-96cc-927b20413b8a cnapi headnode master-20150901T045949Z-g5c40258
@mdrobnak
mdrobnak / gist:5016944
Created February 22, 2013 22:12
prtconf -v from C6220 on SmartOS
[root@024 ~]# prtconf -v
System Configuration: Joyent i86pc
Memory size: 65486 Megabytes
System Peripherals (Software Nodes):
i86pc
System properties:
name='relative-addressing' type=int items=1
value=00000001
name='MMU_PAGEOFFSET' type=int items=1
@mdrobnak
mdrobnak / smartos-autoprovision.diff
Created January 19, 2013 03:49
Diff of stock smartos_prompt_config.sh vs with autoprovisioning. This has no formatting cleanups except for one small section. admin_mac is passed via a boot parameter in iPXE - autoprovision="true",admin_mac=${netX/mac} is added to the boot parameters to activate this code.
--- stock-smartos_prompt_config.sh 2012-12-28 02:38:25.657297000 +0000
+++ smartos_prompt_config.sh 2013-01-19 03:31:54.001819025 +0000
@@ -10,6 +10,12 @@
load_sdc_sysinfo
load_sdc_config
+if /bin/bootparams | grep "^autoprovision=true" >/dev/null; then
+ autoprovision="true"
+else
+ autoprovision="false"