Skip to content

Instantly share code, notes, and snippets.

@eriweb
eriweb / templateupgrade.md
Last active August 17, 2017 17:47
Apache CloudStack 4.4 manually upgrading system vm template after upgrading or installing with 4.3 templates

If your system vm is not currently working you have to make it work. On XenServer you can do this by SSH'ing to it and upgrade java.

apt-get update && apt-get -y install openjdk-7-jre-headless openjdk-7-jre-lib && apt-get -y remove openjdk-6-jre-headless

and it should now work. In some rare cases you have to restart the cloud service

service cloud stop && sleep 3 && service cloud start

and in some even rarer cases you have to restart the ssvm. Do that from the Apache CloudStack UI.

@eriweb
eriweb / acs-kvm-install
Last active August 29, 2015 14:04
ACS install on KVM
export HOSTNAME="acs44-kvm"
IPADDR=$(ifconfig eth0 | grep "inet addr" | cut -d ':' -f 2|cut -d ' ' -f 1)
cat >>/etc/hosts <<EOF
$IPADDR $HOSTNAME
EOF
sed -i 's/ONBOOT=.*/ONBOOT="yes"/' /etc/sysconfig/network-scripts/ifcfg-eth*
# change hostname
sed -i "s/HOSTNAME=.*/HOSTNAME=$HOSTNAME/" /etc/sysconfig/network
@eriweb
eriweb / acs-mgmt-install
Last active August 29, 2015 14:04
ACS mgmt server install
export HOSTNAME="acs44-mgmt"
# enable interfaces
sed -i 's/ONBOOT=.*/ONBOOT="yes"/' /etc/sysconfig/network-scripts/ifcfg-eth*
# change hostname
sed -i "s/HOSTNAME=.*/HOSTNAME=$HOSTNAME/" /etc/sysconfig/network
# disable selinux
setenforce 0
### Keybase proof
I hereby claim:
* I am terbolous on github.
* I am terbolous (https://keybase.io/terbolous) on keybase.
* I have a public key whose fingerprint is 5EB7 8886 30E5 D154 7FAF BB5E 0584 3120 A7BB 49E4
To claim this, I am signing this object:
@eriweb
eriweb / user-data
Last active August 29, 2015 14:05
sample user-data
#cloud-config
#password: passw0rd #uncomment if you want to specify as password
password: RANDOM
chpasswd: { expire: false } # set to true if you want to be forced to change the password on the first login
ssh_pwauth: 1 # this enables password authentication for ssh
@eriweb
eriweb / acs43-debian-fix
Created August 28, 2014 20:23
acs 4.3 debian fix
diff --git a/debian/rules b/debian/rules
index 66800de..4edf893 100755
--- a/debian/rules
+++ b/debian/rules
@@ -12,7 +12,7 @@
DEBVERS := $(shell dpkg-parsechangelog | sed -n -e 's/^Version: //p')
VERSION := $(shell echo '$(DEBVERS)' | sed -e 's/^[[:digit:]]*://' -e 's/[~-].*//')
-MVNADD := $(shell if echo '$(DEBVERS)' | grep -q snapshot; then echo ; fi )
+MVNADD := $(shell if echo '$(DEBVERS)' | grep -q snapshot; then echo -SNAPSHOT; fi )
@eriweb
eriweb / ubuntu-ks
Created September 18, 2014 12:19
ubuntu kickstart
# Ubuntu 14.04 LTS kickstart for XenServer
# branch: develop
##########################################
# Install, not upgrade
install
# Install from a friendly mirror and add updates
url --url http://no.archive.ubuntu.com/ubuntu/
@eriweb
eriweb / gist:f053d1da36be6f7e0045
Created November 3, 2014 22:11
packer-cloudstack config
{
"provisioners": [
{
"type": "shell",
"scripts": [
"scripts/base.sh",
"scripts/cleanup.sh",
"scripts/zerodisk.sh"
]
}
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDbdYxPOrSh7zIV7upuYGnmspu6soDqYGe9O25Bwzlxd96/plgFQD7rgyyjEdh3BqIi6nOyi9xFfaj50cKdnIW9kEC6cIx5L/oOGiCTbaee8wqBAhn7bXwLWwndz8XRnAxnLQ3WXZMK5vrG28Mu1ElGKuZqqtExkFmTwNxN1OQXgpSsruduCc0a/EOd8lio9oLU7QSVSKqu6hpwfo6vrj3cSRBuaWsercy1Qzq3uH1Um8AudA+Busa/u/DoSChykDWser0yPkiiuDhAISCvFaU6za5NJREb6tee48m7k3K6uc63sX9VtxVcPtlTG2HhYLDIUJBDksNzPEF3UtocMtSr eriweb
@eriweb
eriweb / gist:683f78fb9a91b2b2f71e
Created January 14, 2015 13:22
acs45 create-schema-premium patch
diff --git a/setup/db/create-schema-premium.sql b/setup/db/create-schema-premium.sql
index 2f86c0b..a8feff4 100644
--- a/setup/db/create-schema-premium.sql
+++ b/setup/db/create-schema-premium.sql
@@ -296,7 +296,7 @@ CREATE TABLE `cloud`.`netapp_volume` (
`password` varchar(200) COMMENT 'password',
`round_robin_marker` int COMMENT 'This marks the volume to be picked up for lun creation, RR fashion',
PRIMARY KEY (`id`),
- CONSTRAINT `fk_netapp_volume__pool_id` FOREIGN KEY `fk_netapp_volume__pool_id` (`pool_id`) REFERENCES `netapp_pool` (`id`) ON DELETE CASCADE,
+ CONSTRAINT `fk_netapp_volume__pool_id` FOREIGN KEY `fk_netapp_volume__pool_id` (`pool_id`) REFERENCES `cloud`.`netapp_pool` (`id`) ON DELETE CASCADE,