-
get request example:
r = requests.get("url", params={}, auth=(username, password))
-
dir(r)to get response object attributes. -
post request example:
# This is a single line comment.
=begin
This is a multiline comment.
=end
x = 10
print "#{x}\n"- Chef provides a Domain Specific Language (DSL) for specifying Infrastrcture as a Code and the automation necessary to deploy, configure, and manage servers based on that code.
- Allowing the specification of what the final configuration should be and not the steps necessary to make that happen.
- Multiparts: ChefDK (Development Kit), Chef Server and Chef Client.
- Desired State Configuration:
- Specify a server configuration's end result, not the steps to go there.
- "Test and Repair" approach allows chef to only make changes necessary to get the server back to the desired state configuration.
- If server is already in desired state, no changes will occur.
- Two ways of applying configuration (Imperative & Declarative style)
- Imperative Approach (This applies to an single entity and it's gonna differ based on entities)
- Node - a physical or virtual machine that hosts services
- Nodes also referred to as members.
- Examples
- Your computer
- An AWS EC2 instance
- A bare metal machine in your private data center
- Service - executing software that provides utility via an interface
- Typically long-lived process listening on a port(s)
- Examples
- A web server (nginx, apache, iis)
curl -s -o /dev/null -w "%{http_code}" https://www.yahoo.comto print only the http status code.curl -s -D - -o /dev/null https://www.yahoo.comto print only the response headers.-D -dump headers to stdout indicated by --o /dev/nullsend output (HTML) to/dev/nullessentially ignoring it
- https://everything.curl.dev/usingcurl/verbose/writeout
- https://codeahoy.com/general/curl-display-request-response-headers
Algorithm Types
Encryption Algorithms (AES, DES, RSA...)
Authentication Algorithms (MD5, SHA-256, SHA-512, HMAC ...)
Security
Encryption Types:
Symmentric Single key (K) will be used for Encryption and Decryption (AES, DES)
Asymmentric Two keys (KU, KR) will be used for Encryption and Decryption (RSA)
NewerOlder