- openssl genrsa 1024 > username-env-pk.pem
- pk stands for private key
- openssl req -new -x509 -nodes -sha1 -days 365 -key username-env-pk.pem -outform PEM > username-env-cert.pem
- lasts for 365
- Paste username-env-cert.pem in to the AWS Signing Certificates area for that user
- Give user both username-env-pk.pem and username-env-cert.pem, and wish them luck
Friday, 15 March 2013
Generate IAM certs for users on AWS
Labels:
api,
aws,
certificates,
certs,
ec2,
genrsa,
iam,
openssl,
pem,
private key,
public key,
rest,
signing
Redirect all command output, stdin/stderr, to a file on Linux
puppet agent --test --noop >/var/tmp/puppet_noop_20130315 2>&1
Notes:
- The 2>&1 redirects stderr to where stdin points
- stdin points to the console by default unless you change that
- here stdin is redirected to a file under /var/tmp
vagrant on aws
- vagrant plugin install vagrant-aws
- vagrant box add aws001 https://github.com/mitchellh/vagrant-aws/raw/master/dummy.box
- vagrant init
- Adapt below and put in the "Vagrantfile" file
- vagrant up --provider=aws
- vagrant ssh
- vagrant destroy
Vagrant.configure("2") do |config|
config.vm.box = "aws001"
config.vm.provider :aws do |aws|
aws.access_key_id = "<your_aws_key_id>"
aws.secret_access_key = "<your_aws_secret>"
aws.keypair_name = "<your_keypair_name>"
aws.ssh_private_key_path = "/home/<you>/.ssh/<your_keypair_name>.pem"
aws.region = "eu-west-1"
aws.ami = "ami-01080b75"
aws.ssh_username = "ubuntu"
end
end
Labels:
1.1,
aws,
plugin,
vagrant,
vagrantfile,
virtual machines,
vms
Thursday, 14 March 2013
Wednesday, 13 March 2013
Get provisioned public key for AWS EC2 instance via curl
curl http://169.254.169.254/latest/meta-data/public-keys/0/openssh-key
Tuesday, 12 March 2013
Specify ssh key when using rsync
WARNING: don't use ~ and don't use double quotes.
- rsync -av -e 'ssh -i /home/me/.ssh/id_rsa_other' root@logging.gumby.com:/remotedir/ /localdir/
Also, some alternative port:
- rsync -av -e 'ssh -p 2221' root@logging.gumby.com:/remotedir/ /localdir/
Labels:
alternative,
exact,
key,
options,
other,
particular,
port,
rsync,
specific,
ssh
Tuesday, 5 March 2013
Build rpm of monit 5.5
- Download https://github.com/pcharlesleddy/misc/blob/master/monit.spec
- change "_topdir" to match your local system.
- cd into what you set _topdir to
- mkdir -p {BUILD,RPMS,SOURCES,SPECS,SRPMS,tmp}
- Download monit-5.5.tar.gz file and put it in the SOURCES directory
- Put monit.spec in the SPECS directory
- rpmbuild -v -bb --clean SPECS/monit.spec
- yum -y install rpmdevtools
- Output should mention where the rpm ended up
- rpm -qlp on the rpm file to see what's in it
Gory details: http://fedoraproject.org/wiki/How_to_create_an_RPM_package
Notes
Notes
- "%spec -q" means be "quiet" when untarring, not that interesting, but people use it a lot
Subscribe to:
Posts (Atom)
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...
-
CRITICAL: AWS now offers internal VPC DNS! Below is no longer necessary AFAIK. Woo hoo! http://aws.amazon.com/about-aws/whats-new/2014/...
-
build sudo apt-get install git gcc sudo apt-get install automake autoconf git clone git://github.com/rriley/tsunami-udp.git cd tsunam...
-
From: https://bugs.eclipse.org/bugs/show_bug.cgi?id=382972#c4 Assumptions: jEdit was installed into /Applications directory. Close any...