Friday, March 8, 2019
Update cello ansible agent to allow peer external endpoint to be available before start peers
first start services, then get IP address. then generate the deployment yaml file.
Wednesday, February 20, 2019
What information contains in a certificate?
Certificate is normally issued to an individual or a company by CA. In cryptography, a public key certificate, also known as a digital certificate or identity certificate, is an electronic document used to prove the ownership of a public key. Which contains the following information.
openssl x509 -in tlsca.org2msp-cert.pem -text -noout
openssl x509 -in tlsca.org2msp-cert.pem -text -noout
Certificate: Data: Version: 3 (0x2) Serial Number: df:c6:71:a4:bb:41:1f:73:83:ed:d5:95:93:24:2f:f6 Signature Algorithm: ecdsa-with-SHA256 Issuer: C=US, ST=California, L=San Francisco, O=org2msp, CN=tlsca.org2msp Validity Not Before: Feb 20 17:20:00 2019 GMT Not After : Feb 17 17:20:00 2029 GMT Subject: C=US, ST=California, L=San Francisco, O=org2msp, CN=tlsca.org2msp Subject Public Key Info: Public Key Algorithm: id-ecPublicKey Public-Key: (256 bit) pub: 04:02:ea:14:c2:52:0d:02:10:02:c1:6e:41:8e:b7: 33:0e:73:4b:1f:9d:8a:b3:d0:90:41:2d:4f:49:4f: ee:cf:20:05:d4:e6:26:99:d4:d4:90:1c:71:02:bc: 1f:30:15:b1:b2:d4:b2:49:d5:9f:7b:f8:20:15:e6: cc:ae:75:05:12 ASN1 OID: prime256v1 NIST CURVE: P-256 X509v3 extensions: X509v3 Key Usage: critical Digital Signature, Key Encipherment, Certificate Sign, CRL Sign X509v3 Extended Key Usage: TLS Web Client Authentication, TLS Web Server Authentication X509v3 Basic Constraints: critical CA:TRUE X509v3 Subject Key Identifier: 1A:23:57:FF:C1:BC:12:26:EA:94:44:2A:35:E6:A6:AA:9A:58:26:B1:03:52:04:44:10:DA:54:AA:08:2D:D5:5D Signature Algorithm: ecdsa-with-SHA256 30:44:02:20:68:f1:1c:b3:25:ac:a8:99:31:f1:a9:c5:ce:51: c6:cc:90:2f:06:1e:d0:8c:51:e3:1c:f6:30:3d:dd:59:49:8e: 02:20:1b:88:49:b2:ce:c8:1e:30:52:d1:25:a7:7a:47:ff:a4: 03:1b:8d:e5:48:4e:6a:e9:2d:eb:07:36:d3:b5:c0:d4
Thursday, February 14, 2019
Install perf on fabric container
1. apt install linux-tools-generic
2. apt install linux-tools-4.4.0-141-generic
dstat
apt install dstat
dstat -cd --disk-util --disk-tps
apt install atop ioping
iotop
lsblk
ioping /dev/xvdc
2. apt install linux-tools-4.4.0-141-generic
dstat
apt install dstat
dstat -cd --disk-util --disk-tps
apt install atop ioping
iotop
lsblk
ioping /dev/xvdc
Sunday, February 10, 2019
Resize VirtualBox Hard disk
After your virtual machine run for awhile, you found that your originally allocated virtual hard disk may run out of the space. You may not always want to recreate the vm since you may have things in the VM that you do not want to destroy. Here is the process to size the hard disk without destroy what is already in the VM.
1. Use VBoxManage modifyhd command:
3. Use gparted iso mounted onto your VM and then boot up your VM.
4. Use the gparted to resize your disk, then reboot your VM. Your VM at this point will have resized disk size.
1. Use VBoxManage modifyhd command:
VBoxManage modifyhd NGINX.vdi --resize 30000
The parameter for --resize is in MB. 30000 is 30GB. 40000 is 40GB.2. If your VM has snapshots, you will have to do the exact same command for each snapshot vdi file. Without doing this, you will not be able to do the next step.
3. Use gparted iso mounted onto your VM and then boot up your VM.
4. Use the gparted to resize your disk, then reboot your VM. Your VM at this point will have resized disk size.
Friday, November 9, 2018
Getting all running jobs from jenkins
http://hfrdrestsrv.rtp.raleigh.ibm.com:8080/computer/api/xml?tree=computer[oneOffExecutors[currentExecutable[url]]]&xpath=//url&wrapper=build
Sunday, October 21, 2018
mac os x disk mount
Catalina now has restrictions for various applications. You will have to do the following first.
For some reason, now I can only use the sudo to mount a disk
sudo mount -t hfs /dev/disk2s2 /Volumes/tongbackup
I have to create the mount point (/Volumes/tongbackup) first
I did not have to do that before.
For msdos fat file system, do the following.
First Unmount:
Then Mount again:
This mount the msdos file type
- go to System Preferences->Security&Privacy->Privacy->Full Disk Access
- unlock settings (click on lock icon in the left bottom corner and enter password)
- click on + button and select iTerm.app application
- restart iTerm.app and try the mount process again
For some reason, now I can only use the sudo to mount a disk
sudo mount -t hfs /dev/disk2s2 /Volumes/tongbackup
I have to create the mount point (/Volumes/tongbackup) first
I did not have to do that before.
For msdos fat file system, do the following.
First Unmount:
sudo diskutil unmount /dev/disk3s1
Then Mount again:
This mount the msdos file type
sudo mount -w -t msdos /dev/disk3s1 /Volumes/$NAME
or
This mount the exfat file type
sudo mount -w -t exfat /dev/disk3s1 /Volume/$NAME
Then you can write to it.
Monday, October 15, 2018
Jenkins config file provider content
Jenkins has a plugin which provide configuration files to various jobs. The config file managed by this plugin is saved in jenkins_home/org.jenkinsci.plugins.configfiles.GlobalConfigFiles.xml file.
That file is obviously a xml file with content similar to the following:
That file is obviously a xml file with content similar to the following:
<org.jenkinsci.plugins.configfiles.GlobalConfigFiles
plugin="config-file-provider@3.3"> <configs class="sorted-set"> <comparator class="org.jenkinsci.plugins.configfiles.GlobalConfigFiles$1" /> <org.jenkinsci.plugins.configfiles.custom.CustomConfig> <id>bxproduction</id> <name>bxproduction</name> <comment></comment> <content> some content </content> <providerid>org.jenkinsci.plugins.configfiles.custom.CustomConfig</providerid> </org.jenkinsci.plugins.configfiles.custom.CustomConfig></configs>
</org.jenkinsci.plugins.configfiles.GlobalConfigFiles>
Subscribe to:
Posts (Atom)