-
Change
apiVersion
from:- apiVersion: v1
(or
apiVersion: apps.openshift.io/v1
)to:
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var expect = require('chai').expect; | |
var addTwoNumbers = require('../addTwoNumbers'); | |
describe('addTwoNumbers()', function () { | |
it('should add two numbers', function () { | |
// 1. ARRANGE | |
var x = 5; | |
var y = 1; | |
var sum1 = x + y; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var assert = require('assert'); | |
function addTwoNumbers(x, y) { | |
return x + y; | |
} | |
function testAddTwoNumbers() { | |
var x = 5; | |
var y = 1; | |
var sum1 = x + y; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var assert = { | |
equal: function(firstValue, secondValue) { | |
if (firstValue != secondValue) | |
throw new Error('Assert failed, ' + firstValue + ' is not equal to ' + secondValue + '.'); | |
} | |
}; | |
function addTwoNumbers(x, y) { | |
return x + y; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function addTwoNumbers(x, y) { | |
return x + y; | |
} | |
function testAddTwoNumbers() { | |
// 1. ARRANGE | |
var x = 5; | |
var y = 1; | |
var sum1 = x + y; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function addTwoNumbers(x, y) { | |
return x + y; | |
} | |
console.log(addTwoNumbers(5, 1)); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
export vault=/usr/local/bin/vault | |
export VAULT_TOKEN=$(cat /root/.vault-token) | |
vault_cacert='-ca-cert=/path/to/your/ca.pem' | |
local_vault="-address=https://$(hostname -f):8200" | |
unsealed_vault="-address=https://$(getent hosts $(dig +short vault.service.consul | tail -n 1) | awk '{ print $2 }'):8200" | |
leader_vault="-address=https://$($vault status $vault_cacert $unsealed_vault 2> /dev/null | grep Leader | awk '{ print $2 }' | sed 's/^http\(\|s\):\/\///g'):8200" | |
vault_read="$vault read $vault_cacert $leader_vault" | |
vault_unseal="$vault unseal $vault_cacert $local_vault" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Convert p12 to pem | |
openssl pkcs12 -in certificate.p12 -out certificate.pem -clcerts -nodes | |
# Convert pem to p12 | |
openssl pkcs12 -export -in certificate.pem -out certificate.p12 -passout pass:password |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Use envFrom to load Secrets and ConfigMaps into environment variables | |
apiVersion: apps/v1beta2 | |
kind: Deployment | |
metadata: | |
name: mans-not-hot | |
labels: | |
app: mans-not-hot | |
spec: | |
replicas: 1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
I have to make ssh calls from python, there are few options | |
however we run in jython and it runs automated, so adding extension is difficult. | |
luckily we have access to jsch jars. | |
here is a example on how to connect to a ssh server using jsch from python/jython | |
from com.jcraft.jsch import JSch |
NewerOlder