Skip to content

Instantly share code, notes, and snippets.

View AshWilliams's full-sized avatar
:octocat:
Growth Mindset

Robert Rozas Navarro AshWilliams

:octocat:
Growth Mindset
View GitHub Profile
let videos = []
let logArrayElements = (element, index, array) => {
videos.push(element.href);
}
items.forEach(logArrayElements)
resource "vsphere_virtual_machine" "vm" {
name = "terraform-windows-2016"
resource_pool_id = "${data.vsphere_compute_cluster.cluster.resource_pool_id}"
datastore_id = "${data.vsphere_datastore.datastore.id}"
num_cpus = 2
memory = 1024
guest_id = "${data.vsphere_virtual_machine.template.guest_id}"
scsi_type = "${data.vsphere_virtual_machine.template.scsi_type}"
wait_for_guest_net_timeout = 0
resource "vsphere_virtual_machine" "vm" {
name = "terraform-centos-7"
resource_pool_id = "${data.vsphere_compute_cluster.cluster.resource_pool_id}"
datastore_id = "${data.vsphere_datastore.datastore.id}"
num_cpus = 2
memory = 1024
guest_id = "${data.vsphere_virtual_machine.template.guest_id}"
scsi_type = "${data.vsphere_virtual_machine.template.scsi_type}"
wait_for_guest_net_timeout = 0
data "vsphere_datacenter" datacenter {
name = "${var.datacenter}"
}
data "vsphere_datastore" datastore {
name = "${var.datastore}"
datacenter_id = "${data.vsphere_datacenter.datacenter.id}"
}
data "vsphere_compute_cluster" cluster {
---
# create a new VM from a template
- name: VM from template
hosts: localhost
gather_facts: false
connection: local
vars:
vcenter_server: "vcenter.example.com"
vcenter_datacenter: "dc01"
vcenter_cluster: "cluster01"
@AshWilliams
AshWilliams / install.md
Created March 18, 2019 13:41 — forked from mrbobbytables/install.md
Kubernetes Tutorial Install Prerequisites

Kubernetes Tutorial Install Instructions

If you have any questions or run into any problems, please don't hesitate to contact me here: [email protected]

All Platforms

Ensure your laptop has Virtualization Extensions (Intel VT or AMD-V) enabled and is capable of running a 2 core, 2GB RAM Virtual Machine.

Software to be Installed

@AshWilliams
AshWilliams / nginx-tuning.md
Last active January 4, 2019 17:38 — forked from denji/nginx-tuning.md
NGINX tuning for best performance

Educ.ar

NGINX Tuning For Best Performance

For this configuration you can use web server you like, i decided, because i work mostly with it to use nginx.

Generally, properly configured nginx can handle up to 400K to 500K requests per second (clustered), most what i saw is 50K to 80K (non-clustered) requests per second and 30% CPU load, course, this was 2 x Intel Xeon with HyperThreading enabled, but it can work without problem on slower machines.

You must understand that this config is used in testing environment and not in production so you will need to find a way to implement most of those features best possible for your servers.

Move Docker containers to other computer
This page is work in progress, and needs more details.
If you want to move Docker containers to another computer (laptop, server etc) that also has Docker installed, use Docker export and import commands:
https://docs.docker.com/engine/reference/commandline/export/
https://docs.docker.com/engine/reference/commandline/import/
If mongo data is on volume, also use this:
# nginx configuration
location / {
if (!-e $request_filename){
rewrite ^(.*)$ /index.php?WOLFPAGE=$1 break;
}
}
/// <summary>
/// Serializer Class.
/// </summary>
public class Serializer
{
//types:
// N = null
// s = string
// i = int
// d = double