Running a KVM virtual machine inside a runc contianer.
- A host which can run KVM virtual machines using Vagrant.
locals { | |
our_rendered_content = templatefile("${path.module}/yourtemplatefile.tmpl", { yourvars = var.yourvars }) | |
} | |
resource "null_resource" "local" { | |
triggers = { | |
template = local.our_rendered_content | |
} | |
# Render to local file on machine |
This document outlines the steps to set up a one tunnel IPSec Site to site VPN on AWS and a VM on another cloud provider (Packet) running Strongswan.
(References:
https://docs.aws.amazon.com/vpn/latest/s2svpn/SetUpVPNConnections.html
(This can be any cloud provider. It does not have to be Packet)
FROM ubuntu:18.04
RUN apt-get update -y && \
DEBIAN_FRONTEND=noninteractive apt-get install -y qemu-kvm libvirt-daemon-system libvirt-clients bridge-utils vagrant && \
apt-get autoclean && \
apt-get autoremove && \
vagrant plugin install vagrant-libvirt
COPY startup.sh /
ENTRYPOINT ["/startup.sh" ]
If you are like me you find yourself cloning a repo, making some proposed changes and then deciding to later contributing back using the GitHub Flow convention. Below is a set of instructions I've developed for myself on how to deal with this scenario and an explanation of why it matters based on jagregory's gist.
To follow GitHub flow you should really have created a fork initially as a public representation of the forked repository and the clone that instead. My understanding is that the typical setup would have your local repository pointing to your fork as origin and the original forked repository as upstream so that you can use these keywords in other git commands.
Clone some repo (you've probably already done this step).
git clone [email protected]
When I tried to push to Github, it gave me this error.
remote: Permission to NEWUSER/NEWREPO.git denied to OLDUSER.
fatal: unable to access ‘https://github.com/NEWUSER/NEWREPO.git/': The requested URL returned error: 403
But setting the user.name and email globally should have fixed it, No it did not. So I got it fixed by deleting the OLDUSER associated with GitHub from Keychain Access app under Passwords section. Then the push command went successful. :)
While running ansible playbook, I encountered this error
Traceback (most recent call last):
File "/usr/local/bin/ansible-playbook", line 110, in <module>
display.error("Unexpected Exception: %s" % to_unicode(e), wrap_text=False)
File "/Library/Python/2.7/site-packages/ansible/utils/display.py", line 261, in error
self.display(new_msg, color=C.COLOR_ERROR, stderr=True)
File "/Library/Python/2.7/site-packages/ansible/utils/display.py", line 124, in display
msg2 = to_bytes(msg2, encoding=self._output_encoding(stderr=stderr))
File "/Library/Python/2.7/site-packages/ansible/utils/unicode.py", line 208, in to_bytes
Mysql failed to start, and I got these errors
160405 8:58:33 InnoDB: Operating system error number 13 in a file operation.
InnoDB: The error means mysqld does not have the access rights to
InnoDB: the directory.
InnoDB: File name ./ibdata1
InnoDB: File operation call: 'create'.
InnoDB: Cannot continue operation.
160405 08:58:33 mysqld_safe mysqld from pid file /var/run/mysqld/mysqld.pid ended
Create the SSL certificate -
Let us make a directory to store all our ssl configuration.
sudo mkdir /etc/nginx/ssl
Next, create the key -
sudo openssl req -x509 -nodes -days 365 -newkey rsa:2048 -keyout /etc/nginx/ssl/nginx.key -out /etc/nginx/ssl/nginx.crt
These options will create both a key file and a certificate.
#Set up nginx virtual host on Ubuntu 14.04
In this example, we will create a website called devops.com and create site to publish "Hello World!"
We are assuming you have nginx installed. If not, follow the steps here to install nginx .
We want to make the necessary directories in /var/www
folder.
sudo mkdir -p /var/www/devops.com/httpdocs
And we want to write Hello world!
in Index.html file.