- using Ansible command line:
ansible-playbook --connection=local 127.0.0.1 playbook.yml- using inventory:
127.0.0.1 ansible_connection=local| Questions are not from any actual exam!!! | |
| Q: Create a job that calculates pi to 2000 decimal points using the container with the image named perl | |
| and the following commands issued to the container: ["perl", "-Mbignum=bpi", "-wle", "print bpi(2000)"] | |
| Once the job has completed, check the logs to and export the result to pi-result.txt. | |
| Solution: |
| ## NOTE: when finding file by time, use one of the following flags: | |
| # ctime : the time a file was changed, in hours. On most systems this timestamp cannot be altered by any user, so it is fairly reliable | |
| # atime : the time a file was last accessed, in hours. This is also set by the system. | |
| # mtime : the modified time of a file, in hours. This can be set by any user. So if you are looking for mailcious files, never use this flag. | |
| # cmin : same as mtime, but in minutes. | |
| # amin : same as atime, but in minutes. | |
| # mmin : same as mtime, but in minutes. | |
| # Find all files in current directory changed more than 8 hours ago (480 minutes) | |
| find $PWD -mindepth 1 -type f -cmin +480 |
ansible-playbook --connection=local 127.0.0.1 playbook.yml127.0.0.1 ansible_connection=local| oc new-project image-uploader --display-name='Image Uploader Project' | |
| oc new-app centos/ruby-22-centos7~https://github.com/openshift/ruby-ex.git | |
| oc new-app --image-stream=php --code=https://github.com/OpenShiftInAction/image-uploader.git --name=app-cli | |
| oc describe svc/app-cli | |
| oc expose svc/app-cli | |
| oc describe route/app-cli | |
| oc scale dc/app-cli --replicas=2 | |
| oc scale dc/app-cli --replicas=1 | |
| oc get pods --show-all=false | |
| oc exec app-cli-1-9hsz1 hostname |
| version: '2' | |
| services: | |
| zookeeper: | |
| image: wurstmeister/zookeeper | |
| ports: | |
| - "2181:2181" | |
| kafka: | |
| image: wurstmeister/kafka | |
| ports: | |
| - "9092:9092" |
| Erdem in gist |
| Erdem in gist |
| Erdem in gist |
| String file contents |