Category: <span>Uncategorized</span>

Openshift comes with a set of default templates, you can use oc get templates -n openshift to show them
Each template contains specifc sections
  • The objects section: defines a list of resources that will be created
  • The parameters section: defines parameters that are used in the template objects
1 – Inspect the template file for the parameters
I export the postgresql-ephemeral to a yaml file using :  oc get template postgresql-ephemeral -o yaml -n openshift > postgresql.yaml 
Then inspect the yaml file  oc process --parameters -f <filename.yaml>
2 – Create the application using oc process
oc process -f postgresql.yaml -l app=mydb -p DATABASE_SERVICE_NAME=dbservice -p POSTGRESQL_USER=dbuser \
-p POSTGRESQL_PASSWORD=password -p POSTGRESQL_DATABASE=books | oc create -f -

Uncategorized

 

I have on my desk now 2 MacBooks Pro a monitor, a keyboard and a magic mouse. For the two computers to share the monitor, keyboard and mouse I should buy a KVM but I don’t want to have too many cables on the desk and also the cost of the KVM for the macbooks is too expensive for me in Brazil.

I found an interesting solution which was to connect each macbook using HDMI adapters to the monitor and use a software to switch the keyboard and mouse between the computers.

I’m testing Barrier and so far everything is working fine.

There is feature very cool :  You can copy and paste from one computer to another.

You can see this video and see how it works

Uncategorized

Node-red 1.1 released with several new features

 

Uncategorized

When i execute brew install mongodb the error message above appears :

Error: No available formula with the name "mongodb"
==> Searching for a previously deleted formula (in the last
month)...
Warning: homebrew/core is shallow clone. To get complete history
run:git -C "$(brew --repo homebrew/core)" fetch --unshallow
Error: No previously deleted formula found.
==> Searching for similarly named formulae...
Error: No similarly named formulae found.
==> Searching taps...
==> Searching taps on GitHub...
Error: No formulae found in taps.

How i solve this problem:

The formula mongodb has been removed from homebrew-core.  So i need to use a custom tap made by mongodb team

I used the following commands

brew update
brew tap mongodb/brew
brew install mongodb-community
sudo mkdir /data/db
chmod -Rv <myusername> /data/db

Now i can run mongod to start the server or if you want you can use brew services start mongodb-community

Uncategorized

I have this problem today after i change my account on my macbook.

The solution that worked for me was to delete the OneDrive Cached Credential key from the Keychain. The procedure was the following:

  1. Launch Spotlight Search (shortcut: command + space), type keychain, and press return. This should launch the Keychain Access app.
  2. Type OneDrive into the Keychain Access search box. This should show a short list of keys related to OneDrive.
  3. Click on the key called “OneDrive Standalone Cached Credential” or some variant thereof.
  4. Press the delete key (or use the menu item Edit > Delete) to delete the cached credential key.
  5. Restart  OneDrive.
  6. Enter your user and password again.

I found the solution above on Apple forum.

Uncategorized

IBM Champions demonstrate both expertise in and extraordinary support and advocacy for IBM technology, communities, and solutions.

I am an IBM Champion since the first class  (2011) an this year i wish to be  an IBM Champion for the year 2020.

New Champion Nominations are open now through 22 November 2019. Current IBM Champions may submit a renewal through 9 November 2019.

To nominate an IBM Champion use this link

 

Uncategorized

The course isn’t quite for total beginners as it assumes people have done a little programming in JavaScript or played around with the MIT-developed Scratch visual programming language aimed at kids.

But it could help beginners kick-start ambitions to build machine-learning apps, web applications, or automate processes on a desktop.

Uncategorized

One of my apps does not start after a restart. I changed several things on the Node-Red app and i think the restart will be a good idea.

On the logs view there was no good messages to see what is happening with Node-Red

So i start the terminal and go to use IBM cloud CLI

to get the app log just logon and type ibmcloud cf logs [appname] > log.txt

I saw the following messages

[CELL/0] OUT Cell a64da35a-93fb-4f76-abd8-219869380b84 creating container for instance 6b30e79e-2853-4199-4c3e-1cc0
2019-09-04T13:54:47.36-0300 [CELL/0] OUT Cell a64da35a-93fb-4f76-abd8-219869380b84 successfully created container for instance 6b30e79e-2853-4199-4c3e-1cc0
2019-09-04T13:54:55.45-0300 [CELL/0] OUT Starting health monitoring of container
2019-09-04T13:55:06.64-0300 [APP/PROC/WEB/0] OUT > [email protected] start /home/vcap/app
2019-09-04T13:55:06.64-0300 [APP/PROC/WEB/0] OUT > node –max-old-space-size=180 index.js –settings ./bluemix-settings.js -v
2019-09-04T13:55:06.98-0300 [APP/PROC/WEB/0] OUT 4 Sep 16:55:06 – Starting Node-RED on IBM Cloud bootstrap
2019-09-04T13:55:06.98-0300 [APP/PROC/WEB/0] OUT 4 Sep 16:55:06 – Loading bluemix-settings.js
2019-09-04T13:55:07.18-0300 [APP/PROC/WEB/0] OUT 4 Sep 16:55:07 – Failed to find Cloudant service: /^IoT-Cool.cloudantNoSQLDB/
2019-09-04T13:55:07.19-0300 [APP/PROC/WEB/0] ERR module.js:478
2019-09-04T13:55:07.19-0300 [APP/PROC/WEB/0] ERR throw err;
2019-09-04T13:55:07.19-0300 [APP/PROC/WEB/0] ERR ^
2019-09-04T13:55:07.19-0300 [APP/PROC/WEB/0] ERR Error: Cannot find module ‘./node_modules/node-red/red/runtime/storage/localfilesystem’

Node-Red was unable  connect to Cloudant. But not was changed on Cloudant side.

I changed the Title of the app to another name before the restart, that was the cause of the problem.

I think there is a relation between the APP name and the Cloudant Service linked to the app

After i change the app name to the old one, Node-Red starts again.

 

 

 

IoT Uncategorized

These are my steps to create a MySQL Docker container, i am using Docker for Mac.

1 – Create a folder to save the database. If you do not create a Docker volume you will loose your data when you restart your container.  My folder is /Users/keniocarvalho/VolumesDocker/mysqdata

2- Execute the command bellow:

docker run –name mysqldb -p 3306:3306 -v /Users/keniocarvalho/VolumesDocker/mysqdata/:/var/lib/mysql -e MYSQL_ROOT_PASSWORD=password -d mysql/mysql-server:latest

3 – Enter on the mysql container using the command :  docker exec -it mysqldb bash

4 – Inside the container type : mysql -uroot -p. The system will ask for the password. Here the password is password.

5 – To access the database from outside the container run this commands on the mysql console:

CREATE USER ‘root’@’%’ IDENTIFIED BY ‘root’;

GRANT ALL PRIVILEGES ON *.* TO ‘root’@’%’ WITH GRANT OPTION;

FLUSH PRIVILEGES;

Verify the permission:

mysql> SELECT host, user FROM mysql.user;
+———–+——————+
| host | user |
+———–+——————+
| % | root |
| localhost | healthchecker |
| localhost | mysql.infoschema |
| localhost | mysql.session |
| localhost | mysql.sys |
| localhost | root |
+———–+——————+

Now you can access the mysql from outside of the container using port 3306  from any host.

Obs: This is not a setup for Production use only in your development workstation.

 

Uncategorized

Last week i got back my Macbook Pro 15 2016, after 10 days.  The laptop go to service on an Apple Technical Assistance here in my city.

My first Macbook Pro (Mid 2012) works for 5 years without issues.

The first problem was the speakers. Sound was horrible.  The problem is the same described on this link.

The second problem was the battery. With only 86 cycles a message about to service the battery appears.

The third problem was #staingate. 

Apple replace all parts of my Macbook. The service is ok until now.

Lots of problems with this expensive machine. The quality is not the same anymore.

Uncategorized