Skip to content

Instantly share code, notes, and snippets.

Chapter 2. Building a personal CD library.

Starting a django project

$ mkdir chapter2 && cd chapter2
$ django-admin.py startproject djen_project .

Getting started with the App

  • create app

Frappe - Creating a Custom Application & Integrating it with ERPNext

Exercise create a total weight field in erpnext Sales Order

Custom Application

create new app

$ bench new-app erpnext_shipping
INFO:bench.app:creating new app erpnext_shipping
package {'puppet-lint':
ensure => 'installed',
provider => 'gem',
require => Package['rubygems'],
}
package { 'rubygems':
ensure => present,
}
git checkout master <filename>
systemctl status puppetmaster
systemctl status puppetmaster.service
service puppetmaster status
# Nagios Features
1. Infrastructure Monitoring
a. Provided by: Nagios Core | Nagios XI (commercial offering)
b. Uses standard protocols: ICMP, TCP, UDP, etc
c. Host resources: Disk, CPU, RAM usage - NRPE add on
d. Event handler for service restarts across platforms: linux, unix, windows, etc.
e. Checks are performed every 5 minutes by default, unless overriden via HOST, HOSTGROUP, SERVICE, etc
f. Active (Default, Nagios-initiated) and Passive (externally-initiated) checks are supported
# nested_loos.yml
---

- name: Network Getting Started First Playbook
  hosts: all
  tasks:
    - name: say hello using nested loops
      debug: msg="The value {{ item[0] }} and {{ item[1] }}"
 with_nested:
# iterator_conditional.yml
---

- name: test iteratory with when
  hosts: all
  tasks:
  - command: echo {{ item }}
    with_items: [ 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 ]
 when: item &gt; 7