test in python for devops
Web application
Write a web application to accept the following and create, delete or modify a user with the same on a linux machine:
1. username
2. Shell type
3. Home folder
4. Password
5. Grant sudo privileges to the user or not.
6. Select between create, delete and modify.
The application has to be written in Python using the flask web framework. The application will need to run as a specified user (The user will have sudo privileges). The application will need to validate the input, verify that the username provided can indeed be created, and go ahead with the specified operation that has been input.
Shell script
Given a file of the form (you can use /etc/passwd):
root:x:0:0:root:/root:/bin/bash
daemon:x:1:1:daemon:/usr/sbin:/bin/sh
bin:x:2:2:bin:/bin:/bin/sh
sys:x:3:3:sys:/dev:/bin/sh
sync:x:4:65534:sync:/bin:/bin/sync
games:x:5:60:games:/usr/games:/bin/sh
man:x:6:12:man:/var/cache/man:/bin/sh
lp:x:7:7:lp:/var/spool/lpd:/bin/sh
mail:x:8:8:mail:/var/mail:/bin/sh
news:x:9:9:news:/var/spool/news:/bin/sh
Write a bash 4.0 shell script that does not use any external commands that will sum the third field, delimited by ':'. Your script should take the name of the file to process as the first command line argument.
powershell
Powershell
ls , cd .. , mkdir folder , get-host
upgrade windos management framework 4.0
ls and dir is alias for get-childitem
its a cmdlet
the cmdlet is always has verb-singularnoun
get-service
get-process or ps
get-command will list all the
command of cmdlet
To list all the builtin aliases
get-alias
copy one folder to another :
copy-item C:\test1 C:\test2 –recurse
copy-item C:\test1,'C:\program files' C:\tset2
To get all the options for help for each cmdlet
Get-help copy-item ( it may ask you
to update the help )
( Update-help -> to update your help file )
Get-help copy-item –full
Suppose you want to search for a specific command
( in linux we use grep)
Get-command "services"
Get-command –Name *service* Ã will give you only services .
behat - imp links
https://knpuniversity.com/screencast/behat/install
http://www.agix.com.au/install-composer-on-centosredhat/
http://stackoverflow.com/questions/23682229/set-up-selenium2-mink-extension-on-behat-to-use-more-than-one-browser
http://lin-clark.com/blog/2013/11/26/quickstart-testing-with-behat-mink-selenium/
https://github.com/Behat/MinkExtension-example
https://github.com/alnutile/behat_editor/blob/master/behat_features/full_test.feature
http://behat-drupal-extension.readthedocs.org/en/3.1/drush.html
http://mink.behat.org/en/latest/guides/interacting-with-pages.html
http://docs.behat.org/en/v2.5/cookbook/behat_and_mink.html
http://knplabs.com/en/blog/behat-like-a-boss-wirting-custom-steps
What Makes a DevOps
DevOps
Devops
- Infrastructure: Amazon Web Services, VMware, RackSpace, Microsoft Azure, KVM, Heroku, Amazon OpsWorks, Amazon ElasticBeanstalk, Docker, Vagrant
- Web / Application Architecture / Site Performance / Load Balancing: Apache, NGINX, JBoss, Apache Tomcat, Rails, Node.js, DJango, PHP, Amazon CloudFront, Akamai, Amazon AutoScaling, Varnish Software, Memcached, Redis, Amazon ElastiCache, Red Hat Cluster Suite, F5 LTM (Local Traffic Manager) & GTM (Global Traffic Manager), Amazon Elastic Load Balancer, HAProxy
- Authentication, Authorization, and Access Control OpenLDAP:RSA Authentication, Radius Authentication, MFA (Multi-Factor Authentication)/Google Authenticator, Centrify/Powerbroker, SAML, OAuth
- Environment Build and Deployment: Packer, PXE, Foreman, Red Hat Kickstart, Spacewalk, RedHat Satellite Service, Mrepo, Pulp
- Orchestration / Service Discovery: Consul, Registrator, Consul Template, Shipyard, CloudFormation, Terraform
- Configuration Management / Automation: Puppet, Chef, SaltStack, Ansible, Beaker, TestKitchen, ServerSpec, Berkshelf, r10k
- Big Data Operations: Apache Hadoop, Cloudera, MapR, Hortonworks, Kafka, Storm, Oozie, Sqoop, Pig
- Operational Visibility (Service Health Monitoring, Capacity Planning, and Reporting): Elasticsearch, Logstash, Kibana, Splunk, Graphite, Grafana, Cacti, SNMP, Diamond, CollectD, NRPE, Nagios, Sensu, CloudWatch
- Release Management: GIT, SVN, Stash, GitLab, GitHub, BitBucket, Docker Registry Hub / Private Registry, Jenkins, Bamboo, TravisCI
- Message Queuing: RabbitMQ, ZeroMQ, ActiveMQ, Amazon SQS,
- Storage: NFS File Server, iSCSI, Fiber Channel, NAS / SAN, Netapp, 3par, EMC, Multipath / MPIO, device-mapper, PowerPath
- Security: Host based Firewalls (Iptables), SSL VPN (OpenVPN), IPSEC VPN (OpenSwan, LibraSwan), Amazon VPC, IAM, Security Groups & ACLs, SELinux, Auditing and hardening Linux servers
- ITIL Service Operations (Incident, Problem, and Event Management): Design and implement change control solutions, Design and implement disaster recovery solutions, Design and implement business continuity solutions, Root-cause analysis investigation, Linux Kernel performance troubleshooting and tuning, Application performance troubleshooting and tuning
- Backup and Recovery: Tivoli – TSM, HP DataProtector, Bacula, NetBackup, BackupExec, Rsync-based solutions