After savings that into test.yml you can run using the following command
Showing posts with label yaml. Show all posts
Showing posts with label yaml. Show all posts
Thursday, December 24, 2020
Create 10 virtual users every second on an average for 1 minutes, perform post request to create user details and print the new ID created for each user name using Debug option
We need to below script for the above scenario.
Sunday, December 20, 2020
Artillery inline variable using yml
Below script show how to use inline variables in artillery using yml.
Saturday, December 19, 2020
Search in yml
Below program show the sample script to search using the yml
artillery run test.yml -o output
The output will be saved in Jason format
Looping using the yaml or yml
Above script is used for looping 100 times for using user id 3 for 20 virtual users for one minute. Save the above code with test.yml
For running the above script
artillery run test.yml -o output
Create put request in artillery using the yaml.
Create a test.yml file and run the above code
The above code will run using
artillary run test.yml -o output
Saturday, December 8, 2018
Install Nginx and PostgreSQL using Ansible Playbook
Below Script will Install the NGiNX and PostgreSQL in linux ubuntu.
1) Copy the below code in ansible home directory using vi test.yml
---
- name: Install nginx
hosts: all
become: true
tasks:
- shell: apt-get upgrade -y; apt-get update
- name: Install nginx
apt:
name: nginx
state: latest
- name: Start NGiNX
service:
name: nginx
state: started
- name: Install PostgreSQL
apt:
name: postgresql
state: latest
- name: Start PostgreSQL
service:
name: postgresql
state: started
...
1) Copy the below code in ansible home directory using vi test.yml
---
- name: Install nginx
hosts: all
become: true
tasks:
- shell: apt-get upgrade -y; apt-get update
- name: Install nginx
apt:
name: nginx
state: latest
- name: Start NGiNX
service:
name: nginx
state: started
- name: Install PostgreSQL
apt:
name: postgresql
state: latest
- name: Start PostgreSQL
service:
name: postgresql
state: started
...
2) Save using esc button + :wq!
3) Run the command
ansible-playbook -i myhosts test.yml
Subscribe to:
Posts (Atom)