Skip to content

Instantly share code, notes, and snippets.

  1. Installation on Mac
 cd packages/
 curl -O https://fastdl.mongodb.org/osx/mongodb-osx-x86_64-3.0.6.tgz
 tar -zxvf mongodb-osx-x86_64-3.0.6.tgz 
 ls
 sudo mv mongodb-osx-x86_64-3.0.6 /usr/local/mongodb
 sudo mkdir -p /data/db
 
 sudo chown thanh_nt /data/db
  • Terraform có regional và các global services. ĐỐi với các regional service như EC2, chỉ được sử dụng trên region đó. Với các global service như IAM, có thể được sử dụng every where.
  • S3 là lẫn lộn. S3 là regional service, nhưng namespace lại global. Nghĩa là tên S3 là duy nhất trên tất cả các region.
  • Sử dụng terraform module là ngu ngốc, môt biến p được khai báo nhiều lần :|
java.lang.IllegalStateException: Expected to be healthy after starting. The following services are not running: {FAILED=[JerseyService [FAILED]]}
2018-08-15T02:02:17.263+07:00 ERROR [LookupDataAdapter] Couldn't start data adapter <spamhaus-drop/5b731ac0368c47491aa4157b/@2e1b5d1>
org.graylog.plugins.threatintel.tools.AdapterDisabledException: Spamhaus service is disabled, not starting (E)DROP adapter. To enable it please go to System / Configurations.
at org.graylog.plugins.threatintel.adapters.spamhaus.SpamhausEDROPDataAdapter.doStart(SpamhausEDROPDataAdapter.java:68) ~[?:?]
at org.graylog2.plugin.lookup.LookupDataAdapter.startUp(LookupDataAdapter.java:59) [graylog.jar:?]
at com.google.common.util.concurrent.AbstractIdleService$DelegateService$1.run(AbstractIdleService.java:62) [graylog.jar:?]
at com.google.common.util.concurrent.Callables$4.run(Callables.java:122) [graylog.jar:?]
at java.lang.Thread.run(Thread.java:748) [?:1.8.0_181]

Concepts:

  • groups: set of hosts
  • facts: contains all info about remote host.
  • Ansible facts are a way of getting data about remote systems for use in playbook variables.
1. these operating systems, Ansible will fallback into using a high-quality Python implementation of OpenSSH called ‘paramiko’.
2. By default, ansible read remote hosts in /etc/ansible/hosts, it is an inventory file.
  1. ping all hosts:
ansible all -m ping
  1. using user
ansible all -m ping -u bruce
1. Root partition là data partition quan trọng nhất trong Linux enterprise and Unix system và là non-swap filesystem duy nhất được
được yêu cầu trong quá trình boot một unix hay linux system.
2. Root partition được mount tới root directory - the root filesystem của linux/unix system.
3. Root filesystem chứa các thư mục/file được yêu cầu để boot linux/unix system:
- thư mục mà qua đó các devices access (/dev)
- thư mục chứa các initialization và config file (/etc)
- thư mục chứa các libraries, system modules, security ... (/lib)
- thư mục chứa các file system binaries (/bin,/sbin)
Lý do khi có một file log lớn, khi đó sẽ làm root partition bị full.
@swdream
swdream / python.md
Last active September 10, 2018 10:31

Boolean

  • True

  • False

  • and or not

List

@swdream
swdream / mongodb.md
Last active September 14, 2018 08:33

update:

import pymongo

myclient = pymongo.MongoClient("mongodb://localhost:27017/")
mydb = myclient["mydatabase"]
mycol = mydb["customers"]
@swdream
swdream / aws.md
Last active August 30, 2018 04:14

IAM

Identity and Access Management

  • Create users and groups
  • Control the permission of user and groups to access AWS resources (using role).

IAM Role

Role cho phép bạn DELEGATE - Uỷ Quyền access cho user/group hoặc các service của AWS TỚI các aws service khác.

http://s2phim.net/xem-phim/7-dieu-uoc-cua-quy/127196/