This file contains hidden or 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
/*DROP TABLE IF EXISTS `update_statements`; | |
create table update_statements ( | |
commands varchar(1024) | |
);*/ | |
-- ------------------- UAA TO LDAP PROCEDURE FOR CLOUD FOUNDRY --------------------------------------------------------- | |
DELIMITER $$ | |
DROP PROCEDURE IF EXISTS UAA_MIG$$ | |
CREATE PROCEDURE UAA_MIG() |
This file contains hidden or 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
default['sshd']['sshd_config']['AuthenticationMethods'] = 'publickey,keyboard-interactive:pam' | |
default['sshd']['sshd_config']['ChallengeResponseAuthentication'] = 'yes' | |
default['sshd']['sshd_config']['PasswordAuthentication'] = 'no' |
This file contains hidden or 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 | |
bosh-creds () { | |
om --target $OM_TARGET --skip-ssl-validation --username $OM_USERNAME --password $OM_PASSWORD curl --silent -p /api/v0/deployed/director/credentials/director_credentials | jq .credential.value | |
} | |
director-uaa-creds () { | |
om --target $OM_TARGET --skip-ssl-validation --username $OM_USERNAME --password $OM_PASSWORD curl --silent -p /api/v0/deployed/director/credentials/uaa_admin_user_credentials |jq -r .credential.value | |
} |
This file contains hidden or 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
bosh -e pcf -d cf-xxxxxxxxxxxxxxxxxxxxxxx vms --vitals --json |jq -r '.Tables |.[].Rows[] | select(.instance|contains("router"))' |
This file contains hidden or 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
## Create CA | |
{ | |
cat > ca-config.json <<EOF | |
{ | |
"signing": { | |
"default": { | |
"expiry": "8760h" | |
}, |
This file contains hidden or 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 | |
subject="Subject of my email" | |
txtmessage="This is the message I want to send" | |
username='[email protected]' | |
password='************' | |
From="[email protected]" | |
rcpt='[email protected]' | |
from_name='N BOINA' | |
rcpt_name='Nicolas Hulot' |
This file contains hidden or 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
$ hostname=app20-nadj2-test.apps.fr1.di-paas.domain | |
# If you are just interested in the code response with curl | |
$ curl -s -o /dev/null -vL $hostname 2>&1 | grep "<\|>" | |
> GET / HTTP/1.1 | |
> Host: app20-nadj2-test.apps.fr1.di-paas.domain | |
> User-Agent: curl/7.64.1 | |
> Accept: */* |
This file contains hidden or 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
$ oc new-app --template=httpd-example -p name=$appname |
This file contains hidden or 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
## How to extend a PV: | |
pvcname=pvc60 | |
volumename=volume60 | |
mountpath=/opt/app-root/src/mount60 | |
# Deploy a test app | |
oc new-app --template=openshift/httpd-example --name=app01 | |
# Create a PVC |
This file contains hidden or 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
# Get label of each nodes: | |
oc get nodes -o=json | jq '.items[] | .metadata.name, .metadata.labels' |