Hey Hey Hey


  • Home

  • Archives

  • Tags

  • Search

Ansible Samples

Posted on 2017-04-15 |

Ansible Samples

  • System Check Samples

https://github.com/openstack/openstack-ansible/blob/master/tests/roles/bootstrap-host/tasks/main.yml

http://docs.ansible.com/ansible/latest/setup_module.html

https://github.com/openstack/openstack-ansible/blob/master/tests/roles/bootstrap-host/tasks/check-requirements.yml

Read more »

Make use of the open sourced wrapper

Posted on 2017-04-15 |

Make use of the open sourced wrapper

https://github.com/kohsuke/winsw/blob/master/doc/installation.md

Prepare Nifi windows server

  1. Make sure JDK 1.8 above is installed on the windows server and in the class path running the service. If not, change the bootstrap.properties to point to correct JDK.

At current stage, JRE is not tested

  1. Here’s an example of config nifi.xml ,put the file under nifi root folder,
1
2
3
4
5
6
7
8
9
10
<service>
<id>nifi</id>
<name>nifi</name>
<description>this service runs nifi solution</description>
<env name="APP_HOME" value="%BASE%"/>
<logpath>%BASE%\logs</logpath>
<logmode>rotate</logmode>
<executable>%BASE%/jre1.8.0_121/bin/java.exe</executable>
<arguments>-cp %BASE%\conf;%BASE%\lib\bootstrap\* -Xms12m -Xmx24m -Dorg.apache.nifi.bootstrap.config.log.dir=%BASE%\logs -Dorg.apache.nifi.bootstrap.config.pid.dir=%BASE%\run -Dorg.apache.nifi.bootstrap.config.file=%BASE%\conf\bootstrap.conf org.apache.nifi.bootstrap.RunNiFi Start</arguments>
</service>
  1. Put the winsw-2.1.0-bin.exe under the folder of nifi root folder, change the name to nifi.exe

  2. Use windows shell command line , run nifi.exe install to install the service

1
nifi.exe install
Read more »

microservices architecture reading

Posted on 2017-04-12 |

https://www.youtube.com/watch?v=CZ3wIuvmHeM

Hystrix –
FIT (Fault Injection Testing)
Critical Microservices — increase the availability
Client Libraries — simplified lib

CAP Theorem: In the presence of a network partition, you must choose between consistency and availability
Netflix’s solution: Eventually Consistency (tech stack: Cassandra)

Infrastructure
multi-region strategy

Stateless service

  • Not a cache or database
  • Frequently access metadata
  • No instance affinity
  • Loss a node is a non-event

Stateful service

  • database & caches
  • custom apps hold large amounts of data
  • Loss of a node is a notable event

EVCache

  • separate the write to different available zones
  • read from local zone
Read more »

What is Kerbose and how it is designed

Posted on 2017-04-05 |
  • What is Kerbose and how it is designed
    • Designing an Authentication System: a Dialogue in Four Scenes
  • my own understanding
    • Scene 1
    • Scene 2
    • Scene 3,
    • Scene 4

What is Kerbose and how it is designed

Designing an Authentication System: a Dialogue in Four Scenes

https://web.mit.edu/kerberos/dialogue.html

http://www.xuebuyuan.com/748249.html

my own understanding

Scene 1

Scene 2

  1. step 客户端向认证服务器Charon请求, 并提交用户名密码和请求的服务名
  2. step 认证服务器Charon检查用户名密码,如果全部正确,则返回一个使用认证服务器的公钥加密的票根, 包含用户名
  3. step 客户端使用票根请求服务,服务器使用私钥解密票根,获取用户名,通过则向该用户提供服务

漏洞: 服务器无法知道解密的票根结果是否正确

Read more »

Vagrant Configuration

Posted on 2017-03-11 |

install Vagrant

install virtual box
Config vagrant behind the proxy,
http://www.netinstructions.com/running-vagrant-1-8-behind-a-proxy/
After proxy being setted, run to add a box
vagrant box add hashicorp/precise64
Vagrant up to start the vm
================Exception of,
303c.768: Error (rc=-5673):
303c.768: NtAllocateVirtualMemory (0000000000400000 LB 0x1000) failed with rcNt=0xc0000018 allocating replacement memory for working around buggy protection software. See VBoxStartup.log for more details
303c.768: Error (rc=-5645):
303c.768: Too many virtual memory regions.

Trying to use other boxes and changed the default location for .vagrant.d to avoid security limitation (by default under current domain user) by,
set VAGRANT_HOME=somewhereelse
Then, run command to add other boxes (32bit)
http://www.vagrantbox.es/

Vagrant

Workarount the proxy

https://runefs.com/2014/11/28/setting-up-vagrant-behind-a-corporate-proxy/

VERR_VMX_NO_VMX

Vagrant conflict with Hyper-V on windows 10, disable Hyper-V before vagrant up

Read more »

IIB connect to gmail

Posted on 2017-03-05 |

Prepare the Gmail Account for Pop3

  • Gmail Settings : Enable Pop3
  • Enable Less secure apps

https://myaccount.google.com/lesssecureapps

Prepare the TrustStore for IIB

https://www.avisi.nl/blog/2012/09/12/quick-way-to-retrieve-a-chain-of-ssl-certificates-from-a-server/

To retrieve the certificate from gmail pop server.

1
openssl s_client -host pop.gmail.com -port 995 -prexit -showcerts

Then save each of the certs as separate .cer or .pem file and import into the truststore.

Set up IIB run time env

1
2
3
mqsisetdbparms TESTNODE_Rachel -n gmailtestaccount -u myemailaddress@gmail.com -p mygmailpassword

mqsisetdbparms TESTNODE_Rachel -n email::gmailtestaccount -u myemailaddress@gmail.com -p mygmailpassword
Read more »

MongoDB Cluster Setup

Posted on 2017-03-05 |

http://www.alphadevx.com/a/491-Running-two-MongoDB-instances-on-one-server
on red hat, the service config is
/usr/lib/systemd/system

https://severalnines.com/blog/turning-mongodb-replica-set-sharded-cluster

Read more »

Deploy rpm package to Nexus

Posted on 2017-02-11 |

Deploy rpm package to Nexus

Method 1

1
2
3
4
5
6
7
8
9
mvn deploy:deploy-file \
-DgroupId=com.github.diegopacheco.sandbox.devops \
-DartifactId=fpmtest \
-Dversion=1.0.0 \
-DgeneratePom=true \
-Dpackaging=rpm \
-DrepositoryId=nexus \
-Durl=http://127.0.0.1:8081/nexus/content/repositories/releases \
-Dfile=slashbin-1.0-1.x86_64.rpm

Method 2

1
2
curl -v -u admin:admin123 --upload-file slashbin-1.0-1.x86_64.rpm \
http://127.0.0.1:8081/nexus/content/repositories/releases/com/github/diegopacheco/sandbox/devops/fpmtest/1.0.1/fpmtest-1.0.1.rpm

Method 3

1
curl -v -F r=releases -F hasPom=false -F e=rpm -F g=com.github.diegopacheco.sandbox.devops -F a=fpmtest -F v=2.0 -F p=rpm -F file=@slashbin-1.0-1.x86_64.rpm -u admin:admin123 http://127.0.0.1:8081/nexus/service/local/artifact/maven/content

Reference links

https://maven.apache.org/guides/mini/guide-encryption.html

https://gist.github.com/diegopacheco/e04e90508451e8ce134b

Read more »

notes of setting up mysql for test env

Posted on 2017-02-11 |

On windows

start and trigger mysql cmd

  • start default mysql db engine
1
mysqld
  • connect to mysql engine and get the cmd prompt
1
mysql -u root -p -h localhost

cmd run under mysql cmd prompt

  • list database
1
show databases;
  • create new database
Read more »

notes of setting up Oracle DB for test env

Posted on 2017-02-11 |

For existing DB, build isolated test from scratch

install oracle XE

  • connect to system instance
1
connect system/password;

the password that you entered during the installation.

  • create user

create user username identified by ‘password’;
and also to give this user some privileges for creating tables, views and so on . .

  • grant access
1
2
grant dba,resource, connect to username;
GRANT Create Session TO username;

Obtain the DDL of the table needed

Read more »
1…161718
Rachel Rui Liu

Rachel Rui Liu

178 posts
193 tags
RSS
GitHub Linkedin
© 2021 Rachel Rui Liu
Powered by Hexo
Theme - NexT.Pisces
0%