Most Unix/Linux systems come with python pre-installed:
$ python -V
| #!/usr/bin/env python | |
| import sys, paramiko | |
| if len(sys.argv) < 5: | |
| print "args missing" | |
| sys.exit(1) | |
| hostname = sys.argv[1] | |
| password = sys.argv[2] |
Typing vagrant from the command line will display a list of all available commands.
Be sure that you are in the same directory as the Vagrantfile when running these commands!
vagrant up -- starts vagrant environment (also provisions only on the FIRST vagrant up)vagrant status -- outputs status of the vagrant machinevagrant halt -- stops the vagrant machinevagrant reload -- restarts vagrant machine, loads new Vagrantfile configurationvagrant provision -- forces reprovisioning of the vagrant machine| Installation and Setting Parameters: | |
| yum install git # Install git | |
| git config --global user.name "<user_name>" # Git global conf | |
| git config --global user.email "<email>" # Git global conf | |
| git config --global system.name "server1.example.com" # Git global conf | |
| git config --global core.editor vim # Set editor to be vim | |
| git config --global core.page 'more' # Git global conf | |
| git config --global core.excludefile ~/.gitignore_global # Ignore files - add lists of the files to be excluded | |
| git config --list |
| oc <verb> <resoure_type> [<name>] | |
| User Login and Authetication | |
| ============================ | |
| oc login -u system:admin https://ose-master01.example.com:8443 | |
| oc whoami | |
| oc whoami -t # prints token which is used to authenticate any api requests from this session to master. | |
| oc logout | |
| oc new-project build-project |
| +-------------------+ | |
| | Splunk Operations | | |
| +-------------------+ | |
| # /opt/splunkforwarder/bin/splunk add forward-server <server_name>:<index_port> | |
| # /opt/splunkforwarder/bin/splunk list forward-server | |
| # /opt/splunkforwarder/bin/splunk add monitor /var/log/messages | |
| # /opt/splunkforwarder/bin/splunk start | |
| +------------------------------------+ | |
| | Splunk Processing Language Example | |
| Run OWASP juice shop app on the minikube | |
| ======================================== | |
| Depending on your platform use the appropriate method to install minikube on your system. For macOS it can be installed using the brew. | |
| # brew install minikube | |
| # minikube start --driver=vmwarefusion | |
| # docker pull bkimminich/juice-shop | |
| # kubectl create deployment juice-shop --image=bkimminich/juice-shop | |
| # kubectl expose deployment juice-shop --port=3000 --type=LoadBalancer | |
| # minikube service juice-shop |
| #!/usr/bin/env bash | |
| # bash 4.1.5(1) Linux Ubuntu 10.04 Date : 2011-08-25 | |
| # | |
| # _______________| httpstatus : get HTTP status code | |
| # | |
| # Usage: httpstatus URL [timeout] [--code or --status] [see 4.] | |
| # ^message with code (default) | |
| # ^code (numeric only) | |
| # ^in secs (default: 3) | |
| # ^URL without "http://" prefix works fine. |