Vagrant is highly useful to build and maintain portable virtual software development environment by doing software configuration management.
Vagrant is developed using Ruby. Vagrant uses provisioners like puppet or chef. Also Vagrat natively supports comes providers like Docker, VMware.
Vagrant acts as a middle layer between virtualization software and providers like Docker containers.
VbscriptSample
On Error Resume Next strComputer = "." Const Quote = """" Dim Result ' Store the arguments in a variable: Set Args = Wscript.Arguments Result = 0 'check usage If 2 <> Args.Count Then Wscript.Quit 1 End If If 2 = Args.Count Then Dim FilePath, strLine,stringToFind, strIndex, strTemp FilePath = Args(0) StringToFind = Args(1) Set objFSO=CreateObject("Scripting.FileSystemObject") if Not objFSO.FileExists(FilePath) Then WScript.Echo StringToFind WScript.Echo "FileReadError!" Wscript.Quit 1 Else Set objFile = objFSO.OpenTextFile(FilePath) Do Until objFile.AtEndOfStream strLine = objFile.ReadLine 'WScript.Echo strLine strIndex = InStr(1, strLine, StringToFind,1) If strIndex = 1 Then strTemp=Replace(strLine," ","",Len(StringToFind)+1) WScript.Echo StringToFind&"#"&strTemp End If Loop objFile.Close End If End If Wscript.Quit Result
Protected: code
Salesforce Visualforce Pages
Visualforce Pages- Similar to HTML page. Uses unique tag based markup language. VF page can be accessed using url.
Example for simple Visualforce page.
Visualforce page code is shown below
Visualforce Page- Output
Visualforce page in lightning interface
What is Dockerfile, image, container !
What is Dockerfile, Docker Image and container ?
When I started reading about Docker, I was confused about the relationship between Docker file vs docker image vs docker container !
Short answer to my question is:
- Docker file is where I need to script my steps on what actions to be done before I make a docker image.
- A sample docker file as below:
- here below in the code, I am pulling JDK environment in line 1.
- copying a java class to app directory in line 2,
- setting app as working directory in line 3 for my docker container after i convert image to container.
- Then finally running my app in line 4.
FROM java:8-jdk-alpine
COPY HelloWorld.class /app/
WORKDIR /app
ENTRYPOINT [“java”,”HelloWorld”] - Docker image is created using the above docker file by building it. (command : docker build -t myhelloworldapp . )
- then spin up the container by using command : docker run myhelloworldapp
Docker Basics
Docker build command is used to generate docker images out of dockerfile line by line instructions.
Docker build is managed by docker daemon and not by CLI.
Docker build context can be a set of files in a specified directory or a git repository.
PATH is for directory and URL is for git
dockerignore file is used to ignore not required files.
Docker daemon runs each instructions from Dockerfile and commits each instructions to new Image.
Docker has build cache to speed up build process.
What is a Docker file, image, container !
What is Dockerfile, Docker image and Docker container?
When I started reading about Docker, I was confused about the relationship between Docker file vs docker image vs docker container !
- Docker file is where I need to script my steps on what actions to be done before I make a docker image.
a sample docker file as below: here below in the code, - I am pulling JDK environment in line 1.
- Then copying a java class to app directory in line 2,
- Then setting app as working directory in line 3 for my docker container after i convert image to container.
- Then finally running my app in line 4.
FROM java:8-jdk-alpine
COPY HelloWorl.class /app/
WORKDIR /app
ENTRYPOINT [“java”,”HelloWorld”] - Docker image is created using the above docker file by building it. (command : docker build -t myhelloworldapp . )
- Note: dockerfile generates read only layers during the image conversion. These read only layers are created based the dockerfile commandline instructions. Images are considered as executable packages and is predefined. Once it is made, it can not be changed unless new dockerfile is created.
- then spin up the container by using command : docker run myhelloworldapp
What is Amazon S3
Amazon S3 enables companies to store massive amount of data in a secure way. S3 enables companies to store, retrieve data.
Benefits:
- High durability, availability, and scalability. S3 provides the most comprehensive compliance capabilities.
- S3 allows data storage up to 5 terabytes
- S3 provides a REST web services interface supporting any internet development tool kit.
- S3 is available in any AWS region worldwide
Components of 3 tier architecture – Web server vs Application server vs Database server
- Web server serves a web content (HTML and static content) over the HTTP protocol.
- Application server is a container on which one can build and expose business logic and processes to client applications through various protocols like HTTP. Some cases it will have internal web server. Application server is heavy in terms of resource usage.
- Database server refers to the back-end system of a database application using client/server architecture. The database server performs tasks such as data analysis, storage, data manipulation, archiving, and other non-user specific tasks
What is amazon aws
amazon-aws
Amazon Web Services (AWS) is a subsidiary of amazon.com. AWS currently provides more than 100 services and helps to setup high computing power, data storage, queuing, notification, machine learning, security, monitoring services available under AWS management console.
Different AWS cloud services?
VPC
What is VPC?
here in the above diagram, Availability zone 1 has Web server 1, App server 1 and DB server 1 orchestrated
Similarly, Availability zone 1 has Web server 2, App server 2 and DB server 2 orchestrated.
The load balancer is placed to handle the load between the servers
EC2
What is EC2?
How to setup a Windows server and Linux server?
How to take snapshot of browser using selenium
Code sample as below:
File srcFile = ((TakesScreenshot)driver).getScreenshotAs(OutputType.FILE);
FileUtils.copyFile(srcFile, new File(“snapshot.png”));