Showing posts with label broken. Show all posts
Showing posts with label broken. Show all posts

Friday, 17 January 2014

LXC and Puppet dev env in 60 seconds


  1. lxc-create -n puppetmaster01 -t debian
  2. lxc-create -n puppetclient01 -t debian
  3. /etc/default/lxc-net
    1. find subnet defined by LXC_NETWORK
  4. vi /var/lib/lxc/puppetmaster01/config
    1. add ip addr ending in .100 to subnet
      1. for example, lxc.network.ipv4 = 10.0.1.100/24
  5. vi /var/lib/lxc/puppetclient01/config
    1. add ip add ending in .101 to subnet
      1. for example, lxc.network.ipv4 = 10.0.1.101/24
  6. lxc-start -d -n puppetmaster01
    1. don't forget the "-d" or you'll be stuck in tty session
  7. lxc-start -d -n puppetclient01
  8. lxc-attach -n puppetmaster
    1. apt-get install puppetmaster
  9. lxc-attach -n puppetclient01
    1. apt-get install puppet
    2. vi /etc/hosts and add entry "puppet" to point at pmaster
WARNING: for distro "saucy" as your container/host system, dnsmasq is broken, vms can not get DHCP IP address from dnsmasq. To attempt to fix, try:
  1. sudo iptables -t mangle -A POSTROUTING -o lxcbr0 -p udp --dport bootpc -j CHECKSUM --checksum-fill
  2. refresh vm IP
    1. stop and start vm, 
    2. or kill existing dhclient process on vm, and run dhclient by hand
      1. pkill dhclient
      2. dhclient -v eth0
  3. If that doesn't help your vm to get an IP address from dnsmasq
    1. delete the iptables rule you just created
      1. iptables -L -t mangle -n --line-numbers
        1. show existing rule numbers in left column
      2. iptables -t mangle -D POSTROUTING <rule #>
        1. for example, iptables -t mangle -D POSTROUTING 1


Friday, 8 November 2013

Building latest collectd on Amazon Linux server in AWS

  1. yum install byacc flex automake libtool libgcrypt-devel glib2-devel libtool-ltdl-devel perl-ExtUtils-MakeMaker
    1. comments below imply this may be necessary: apt-get install bison
  2. git clone https://github.com/collectd/collectd.git
  3. cd collectd
  4. ./build.sh
  5. ./configure
  6. make 
 Some helpful libs, start over to use them
  1. yum install lvm2-devel net-snmp-devel liboping-devel libpcap-devel libesmtp-devel libcurl-devel libmnl-devel
Dated: Nov, 2013

Friday, 3 May 2013

Openfire: use your 3rd-party, signed SSL cert

PLEASE LET ME KNOW IF YOU HAVE FIXES FOR THIS WITH LATEST VERSIONS
  1. default keytool password is "changeit"
    1. use it for all password prompts
    2. works 99%
    3. if it doesn't work, ask around, poke around
  2. Get keytool command in your PATH
  3. Use Openfire's web interface to "generate self-signed certificates"
    1. NOTE: "import a signed certificate and its private key"
      1. broken
        1. says certs were loaded in green, but shows no result in "Server Certificates" list
      2. whole reason for this post
  4. find existing keystores on your chat server
    1. nice updatedb
    2. locate keystore
    3. locate truststore
    4. here, we'll assume /opt/openfire/resources/security
  5. list the "domain" Openfire used for the "generate self-signed certificates" action above
    1. keytool -list -v -keystore /opt/openfire/resources/security/keystore | grep rsa
      1. e.g.: Alias name: my.domain.com_rsa
    2. remember this for a later step
  6. load your CAs root cert into the truststore
    1. first, see if it is there
      1. keytool -list -v -keystore /opt/openfire/resources/security/truststore | grep "Issuer:"
    2. if not, download it from your CA, and
      1. keytool -import -alias myCAsRootCertAlias -file myCAsRootCert.crt -keystore /opt/openfire/resources/security/truststore
      2. verify
  7. create a p12 with your key, cert and CA's cert
    1. openssl pkcs12 -export -in myCert.crt -inkey myKey.key -out myP12.p12 -name my.domain.com_rsa -CAfile myCAsCert.crt -caname root
  8. dump it to a new keystore
    1. keytool -importkeystore -deststorepass changeit -destkeypass changeit -destkeystore mykeystore -srckeystore myP12.p12 -srcstoretype PKCS12 -srcstorepass changeit -alias my.domain.com_rsa
  9. cp -v /opt/openfire/resources/security/keystore /opt/openfire/resources/security/keystore_2013xxyy
  10. cp -v mykeystore /opt/openfire/resources/security/keystore
  11. restart openfire

Interview questions: 2020-12

Terraform provider vs provisioner Load balancing Network Load Balancer vs Application Load Balancer  Networking Layer 1 vs Layer 4 haproxy u...