Showing posts with label yaml. Show all posts
Showing posts with label yaml. Show all posts

Sunday, December 20, 2020

Artillery search and update


Above script will help to update the user name and job then search the new created I'd.

Artillery inline variable using yml

Below script show how to use inline variables in artillery using yml. 

Updates name and job using I'd with starting with 10 to 20 users in 2 mins.

User creation test using artillery

Below script create user duration 2 mins and starting from 10 to 20 virtuals users

artillery timeout sample

save the file into test.yml and run the script

Artillery run test.yml -o output

Saturday, December 19, 2020

Loop and logging

Create a test.yml

the above will be logged the created user.

Search in yml

Below program show the sample script to search using the yml


Save the above XML using test.yml and run the script

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
...


2) Save using esc button + :wq!

3) Run the command 

ansible-playbook -i myhosts test.yml





The output will look like this