Setup Guide For Home Berry Cloud Apps

The Home Berry Cloud Apps are designed to run on a Raspberry Pi and Android devices. This document provides step by step instuctions for setting up your Raspberry Pi 3 and getting the Raspberry Social Wildfly App running on it. These setup instuctions help with everything from downloading an operating system for the Raspberry Pi to registering your Android devices to the Raspberry Pi. If not using the guide in a step-by-step manner, use the index below to jump to the section of interest.

Hardware/Software
Document Conventions
Step 1 - Download Raspbian
Step 2 - Determine The Internal IP
Step 3 - Start Using SSH
Step 4 - Set The Static Ip Address
Step 5 - Get The Software For Your Raspberry Pi
Step 6 - Installing The Postgres Database
Step 7 - Setup The Iptables
Step 8 - Create Wildfly Under /srv/www
Step 9 - Setup The Keystore And Cert
Step 10 - Start Wildfly And Deploy The Social-ear.ear
Step 11 - Configure Your Router For Port Forwarding
Step 12 - Create A User Account For Raspberry Social
Step 13 - Configure Your Browser For Raspberry Social
Step 14 - Register Your Android Device

Hardware/Software

Hardware

Software

Document Conventions

In setting up the Raspberry Social and your Raspberry Pi you need to generate some passwords and determine IP addresses. Our convention in this document is to highlight this information in yellow. This is information that is unique to your setup. The following is a list of the information you will need to determine and keep track of.

my_pi_password - The password for the raspberry pi. To begin with this is set to raspberry but you should change it.

my_db_password - This is the password for the postgres database.

my_keystore_password - This is the password for managing the Java keystore.

my_keypass_password – The password is used to manage the key for a certificate.

my_internal_ip - The ip address given to the pi by the router in your local home network.

my_external_ip - The ip address given to your home by your internet provider.

my_router_ip - The ip address of the router in your local home network.

my_home_network – This is the name you gave your home network when you set up your home router.

my_network_password – This is the password you used when you set up your home router.

my_wildfly_admin – This is the name you will give your wildfly admin user.

my_wildfly_password – This is the password you will use for your wildfly admin user.

In setting up the Rasberry Social and your Raspberry Pi you need to enter setup commands on your pi. Our convention in this document is to highlight this information in grey. We recommend that you copy and paste these commands from this document to the pi when possible. Also we try to verify the setup commands worked correctly by listing some of the setup information. This information is highlighted in light blue.

One of the things you need to decide is how you connect your Raspberry Pi to your router. You can use a cable (eth0) or use the WiFi (wlan0). When doing the setup you may need to change the wlan0 to eth0 depending on your setup. This information is highlighted in cyan.

(Step 1) Download Raspbian And Write It To Your Micro Memory Card

These commands will be for a Windows system so change as needed.

Download the latest version of Raspbian - RASPBIAN JESSIE LITE

Download the win32 disk imager and install on your system https://sourceforge.net/projects/win32diskimager/ Insert the SD micro memory card into the Windows system

Attach your keyboard and monitor to the pi and then insert the SD card in the pi and power up.

Config the pi using raspi-config command. (Note) The raspi-config user interface uses arrow keys to move, space bar to change option, and the “Enter” key to select the option. Also the local we demo is for the US. Change as needed.

sudo raspi-config








(Step 2) Determine The Internal IP On The Raspberry Pi

These steps will be different for a cable or wireless connected pi. The cable connection is recommended. (Note) we had trouble with the pi powering both the monitor and wireless connection at the same time so make sure your pi has enough power.

For cable connected pies only.

If you have connected your pi to the router with a cable, you should already have a my_internal_ip. Enter the following command to see what it is.

sudo ifconfig -a

This is the output you should see:

eth0      Link encap:Ethernet  HWaddr b8:27:eb:1e:68:bb
          inet addr:192.168.1.3  Bcast:192.168.1.255  Mask:255.255.255.0
          inet6 addr: fe80::df87:a99d:b1ae:b435/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:341003 errors:0 dropped:9003 overruns:0 frame:0
          TX packets:129675 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:71497987 (68.1 MiB)  TX bytes:75871239 (72.3 MiB)

lo        Link encap:Local Loopback
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:65536  Metric:1
          RX packets:371678 errors:0 dropped:0 overruns:0 frame:0
          TX packets:371678 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1
          RX bytes:125909115 (120.0 MiB)  TX bytes:125909115 (120.0 MiB)

wlan0     Link encap:Ethernet  HWaddr b8:27:eb:4b:3d:ee
          inet6 addr: fe80::9d57:4ec1:9ca2:927b/64 Scope:Link
          UP BROADCAST MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

Behind the eth0 you should see an inet addr. Behind that label is your my_internal_ip. In this example it is 192.168.1.3

Now you can continue to (Step 3).

For wireless connected Pies only.

This command will scan for wireless access points. You should see your my_home_network in the ESSID:

sudo iwlist wlan0 scan

This command will change your working directory

cd /etc/wpa_supplicant

If you live in the US, you need to change country code from GB to US in config file.

sudo sed -i -- 's/country=GB/country=US/g' wpa_supplicant.conf

Enter your my_home_network and my_network_password in the config file.

Enter this command with the correct information.

sudo bash -c "wpa_passphrase \"my_home_network\" \"my_network_password\" >> wpa_supplicant.conf"

Verify wpa_supplicant.conf is correct by listing the file.

sudo cat wpa_supplicant.conf

You should see something like this output:

country=US
ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev
update_config=1
network={
        ssid="my_home_network"
        #psk="my_network_password"
        psk=b68dafe3ec7d242259690ddede24f85111111111166b6377835e21cac86390c5
}

This command enables your WPA wireless.

sudo systemctl enable wpa_supplicant.service

This command starts your WPA wireless.

sudo systemctl start wpa_supplicant.service

This command reloads the system service.

sudo systemctl daemon-reload

Reconfigure WPA

sudo wpa_cli reconfigure

Reboot to see changes

sudo reboot

login using pi:my_pi_password

Make sure changes are successful with the following command.

sudo ifconfig -a

This is the output you should see:

eth0      Link encap:Ethernet  HWaddr b8:27:eb:c9:5d:23
          inet6 addr: fe80::a0e8:410e:9386:9b25/64 Scope:Link
          UP BROADCAST MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

lo        Link encap:Local Loopback
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:65536  Metric:1
          RX packets:167280 errors:0 dropped:0 overruns:0 frame:0
          TX packets:167280 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1
          RX bytes:56455485 (53.8 MiB)  TX bytes:56455485 (53.8 MiB)

wlan0     Link encap:Ethernet  HWaddr b8:27:eb:9c:08:76
          inet addr:192.168.1.6  Bcast:192.168.1.255  Mask:255.255.255.0
          inet6 addr: fe80::3b5f:63b1:da51:e9fe/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:516514 errors:0 dropped:178055 overruns:0 frame:0
          TX packets:126179 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:344477056 (328.5 MiB)  TX bytes:35359307 (33.7 MiB)

Behind the wlan0 you should see an inet addr. Behind that label is your my_internal_ip. In this example it is 192.168.1.6.

(Step 3) Start Using SSH

Download putty and install on your workstation system. http://www.chiark.greenend.org.uk/~sgtatham/putty/latest.html

Now that you have putty on your workstation, you can copy and paste the rest of the commands from this doc. In putty, a paste is a right mouse click. You should change the local setup information in yellow before the copy and paste. Consider making a copy of this document and doing a global replace using your local settings.

Use putty and log into the pi using my_internal_ip to connect and pi:my_pi_password to login.

(Step 4) Set The Raspberry Pi Static Ip Address

This change keeps the ip address the same for future pi reboots. Copy all 5 lines and paste in putty to edit the dhcpcd config file. Before you do, make sure to change all your local values and change the wlan0 to eth0 if your pi uses a cable connection. Note if your my_internal_ip is something like “192.168.1.6” then your my_router_ip most likely is going to be “192.168.1.1.” The ip address ends with 1 which is like the root ip address.

sudo sed -i -e '$a\
interface wlan0\
static ip_address=my_internal_ip/24\
static routers=my_router_ip\
static domain_name_servers=my_router_ip' /etc/dhcpcd.conf

This command lists /etc/dhcpcd.conf file so you can verify that four new command lines have been added to the end of the file from the command above.

sudo cat /etc/dhcpcd.conf

(Step 5) Get The Software For Your Raspberry Pi

This command gets the updated packages. Answer yes to all questions.

sudo apt-get update && sudo apt-get dist-upgrade && sudo apt-get clean

Install the java, postgres, and iptable packages (Note) Do not use any other version of java for performance reasons.

sudo apt-get install oracle-java8-jdk postgresql iptables iptables-persistent

Update the system profile so executables from the new packages can be found. Copy all 3 lines and paste to edit the profile

sudo sed -i '/export PATH/a \
export JAVA_HOME=/usr/lib/jvm/jdk-8-oracle-arm32-vfp-hflt;\
export JBOSS_HOME=/srv/www/wildfly-10.2.0.Final-SNAPSHOT;' /etc/profile

This command lists the profile to verify the /etc/profile is correct. The new data lines should appear after the "export PATH" line.

sudo cat /etc/profile

Reboot to load changes. You will need to close and reopen your putty window.

sudo reboot

login using pi:my_pi_password

Check to make sure you have your settings.

echo $JBOSS_HOME

You should see:

/srv/www/wildfly-10.2.0.Final-SNAPSHOT

(Step 6) Installing The Postgres Database On The Raspberry Pi

Edit the postgresql pg_hba.conf file.

sudo sed -i -- 's/local all all peer/\ local all all trust/g' /etc/postgresql/9.4/main/pg_hba.conf



sudo sed -i -- 's/host all all 127.0.0.1\/32 md5/\ host all all samehost md5/g' /etc/postgresql/9.4/main/pg_hba.conf



Verify pg_hba.conf is correct by listing the file.

sudo cat /etc/postgresql/9.4/main/pg_hba.conf

You should see these lines in the file:

#"local" is for Unix domain socket connections only local all all trust #IPv4 local connections: host all all samehost md5

Edit the postgresql postgresql.conf file.

sudo sed -i -- 's/max_connections = 100/max_connections = 10/g' /etc/postgresql/9.4/main/postgresql.conf



This file also has the folowing local information so you should change if this is incorrect

lc_messages='en_US.UTF-8' lc_monetary='en_US.UTF-8' lc_numeric='en_US.UTF-8' lc_time='en_US.UTF-8'

If lc_messages, lc_monetary, lc_numeric, and lc_time have been changed enter these commands.

sudo -u postgres pg_dropcluster --stop 9.4 main

sudo -u postgres pg_createcluster --start 9.4 main

If lc_messages, lc_monetary, lc_numeric, and lc_time have not been changed enter this command.

sudo -u postgres pg_ctlcluster 9.4 main reload

The postgresql command line app is 'psql'. To access the admin settings:

sudo -u postgres psql

Then change the password to a more secure password using the command in the 'psql' prompt:

postgres=#\password

my_db_password

Type \q to exit psql

Create the user wildfly-admin. The passwords typed will not show.


sudo -u postgres createuser -d -P -h 127.0.0.1 -U postgres wildfly-admin
Enter password for new role:p$A2016aReSD
Enter it again:p$A2016aReSD
Password: my_db_password  

Create database berrydb and make the owner wildfly-admin user.

sudo -u postgres psql

postgres=# CREATE DATABASE berrydb OWNER "wildfly-admin";

\q

Test to make sure wildfly-admin user can access the berrydb database.

psql -U "wildfly-admin" -W -h 127.0.0.1 -d berrydb

Password for user wildfly-admin:p$A2016aReSD

Should see:

berrydb=>\q

(Step 7) Setup The Iptables

Download the iptables_config.sh script and execute it. Give it your my_internal_ip address when asked.

sudo wget -O iptables_config.sh "goo.gl/m7sbpB"

sudo chmod +x ./iptables_config.sh

sudo ./iptables_config.sh my_internal_ip

Verify the iptables are correct by listing the rules.v4 file.

sudo cat /etc/iptables/rules.v4

The rules.v4 should match the following list (Note: The wlan0 should be listed for those with wireless connections and eth0 for those with cable connections.):

# Generated by iptables-save v1.4.21 on Fri Mar 24 13:36:05 2017
*nat
:PREROUTING ACCEPT [24:2679]
-A PREROUTING -i wlan0 -p tcp -m tcp --dport 80 -j DNAT --to-destination my_internal_ip:8080
-A PREROUTING -i wlan0 -p tcp -m tcp --dport 443 -j DNAT --to-destination my_internal_ip:8443
:INPUT ACCEPT [18:2487]
:OUTPUT ACCEPT [42:3148]
:POSTROUTING ACCEPT [42:3148]
COMMIT
# Completed on Fri Mar 24 13:36:05 2017
# Generated by iptables-save v1.4.21 on Fri Mar 24 13:36:05 2017
*filter
:INPUT ACCEPT [184:18506]
:FORWARD ACCEPT [0:0]
-A FORWARD -d my_internal_ip/32 -p tcp -m tcp --dport 8080 -j ACCEPT
-A FORWARD -d my_internal_ip/32 -p tcp -m tcp --dport 8443 -j ACCEPT
:OUTPUT ACCEPT [121:10498]
COMMIT
# Completed on Fri Mar 24 13:36:05 2017

(Step 8) Create The Wildfly-10.2.0.Final Under /srv/www

Make the home directory for wildfly.

sudo mkdir /srv/www; sudo chown www-data:www-data -R /srv/www

Change the working directory to the wildfly home directory.

cd /srv/www

Download the wildfly tar file.

sudo wget -O downloadWildfly.sh "https://goo.gl/zIiT3Q"

sudo chmod +x ./downloadWildfly.sh

sudo ./downloadWildfly.sh

Unpack the tar file.

sudo -u www-data tar xvzf wildfly-servlet.tar.gz

Remove the tar file. Not needed but it saves space.

sudo rm wildfly-servlet.tar.gz

Make sure a couple of scripts are executable.

sudo chmod +x $JBOSS_HOME/bin/standalone.sh

sudo chmod +x $JBOSS_HOME/bin/add-user.sh

sudo chmod +x $JBOSS_HOME/bin/jboss-cli.sh

Update the wildfly standalone.xml to use my_internal_ip.

sudo sed -i -- 's/1.1.1.1/my_internal_ip/g' $JBOSS_HOME/standalone/configuration/standalone.xml

Update the wildfly standalone.xml to use my_external_ip.

sudo sed -i -- 's/2.2.2.2/my_external_ip/g' $JBOSS_HOME/standalone/configuration/standalone.xml

Create a wildfly management user.

sudo -u www-data $JBOSS_HOME/bin/add-user.sh 

This is the dialog that you should see. The correct responses you should type are shown in yellow. Use your own values for my_wildfly_admin and my_wildfly_password.
Also note that the my_wildfly_password will not be shown when typed and you can use a simpler one than what they recommend. Also just hit return for the groups question.

What type of user do you wish to add?
 a) Management User (mgmt-users.properties)
 b) Application User (application-users.properties)
(a): a

Enter the details of the new user to add.
Using realm 'ManagementRealm' as discovered from the existing property files.
Username :  my_wildfly_admin
Password recommendations are listed below. To modify these restrictions edit the add-user.properties configuration file.
 - The password should be different from the username
 - The password should not be one of the following restricted values {root, admin, administrator}
 - The password should contain at least 8 characters, 1 alphabetic character(s), 1 digit(s), 1 non-alphanumeric symbol(s)
Password : my_wildfly_password
WFLYDM0101: Password should have at least 1 digit.
Are you sure you want to use the password entered yes/no? yes
Re-enter Password : my_wildfly_password
What groups do you want this user to belong to? (Please enter a comma separated list, or leave blank for none)[  ]:
About to add user 'WildflyAdmin' for realm 'ManagementRealm'
Is this correct yes/no? yes
Added user 'WildflyAdmin' to file '/srv/www/wildfly-10.2.0.Final-SNAPSHOT/standalone/configuration/mgmt-users.properties'
Added user 'WildflyAdmin' to file '/srv/www/wildfly-10.2.0.Final-SNAPSHOT/domain/configuration/mgmt-users.properties'
Added user 'WildflyAdmin' with groups  to file '/srv/www/wildfly-10.2.0.Final-SNAPSHOT/standalone/configuration/mgmt-groups.properties'
Added user 'WildflyAdmin' with groups  to file '/srv/www/wildfly-10.2.0.Final-SNAPSHOT/domain/configuration/mgmt-groups.properties'
Is this new user going to be used for one AS process to connect to another AS process?
e.g. for a slave host controller connecting to the master or for a Remoting connection for server to server EJB calls.
yes/no? no

Now repete the steps creating an Application User with the same info. Note that there are values for groups this time.

What type of user do you wish to add?
 a) Management User (mgmt-users.properties)
 b) Application User (application-users.properties)
(a): b

Enter the details of the new user to add.
Using realm 'ApplicationRealm' as discovered from the existing property files.
Username : my_wildfly_admin
Password recommendations are listed below. To modify these restrictions edit the add-user.properties configuration file.
 - The password should be different from the username
 - The password should not be one of the following restricted values {root, admin, administrator}
 - The password should contain at least 8 characters, 1 alphabetic character(s), 1 digit(s), 1 non-alphanumeric symbol(s)
Password : my_wildfly_password
WFLYDM0101: Password should have at least 1 digit.
Are you sure you want to use the password entered yes/no? yes
Re-enter Password : my_wildfly_password
What groups do you want this user to belong to? (Please enter a comma separated list, or leave blank for none)[  ]: USER,ADMIN
About to add user 'NewUser' for realm 'ApplicationRealm'
Is this correct yes/no? yes
Added user 'NewUser' to file '/srv/www/wildfly-10.2.0.Final-SNAPSHOT/standalone/configuration/application-users.properties'
Added user 'NewUser' to file '/srv/www/wildfly-10.2.0.Final-SNAPSHOT/domain/configuration/application-users.properties'
Added user 'NewUser' with groups USER,ADMIN to file '/srv/www/wildfly-10.2.0.Final-SNAPSHOT/standalone/configuration/application-roles.properties'
Added user 'NewUser' with groups USER,ADMIN to file '/srv/www/wildfly-10.2.0.Final-SNAPSHOT/domain/configuration/application-roles.properties'
Is this new user going to be used for one AS process to connect to another AS process?
e.g. for a slave host controller connecting to the master or for a Remoting connection for server to server EJB calls.
yes/no? no

Update the wildfly standalone.xml to use my_wildfly_admin.

sudo sed -i -- 's/my_alert_user/my_wildfly_admin/g' $JBOSS_HOME/standalone/configuration/standalone.xml

Update the wildfly standalone.xml to use my_wildfly_password.

sudo sed -i -- 's/my_alert_password/my_wildfly_password/g' $JBOSS_HOME/standalone/configuration/standalone.xml

(Step 9) Setup The Keystore And Cert

Create the wildfly keystore and cert for ssl.

cd $JBOSS_HOME/standalone/configuration

Use your own local information.

sudo -u www-data keytool -genkey -keyalg RSA -alias mycert -keystore berry.jks \
-storepass my_keystore_password -keypass my_keypass_password -validity 7360 -keysize 2048

What is your first and last name?
  [Unknown]:  my_external_ip
What is the name of your organizational unit?
  [Unknown]:  com
What is the name of your organization?
  [Unknown]:  berrycloud
What is the name of your City or Locality?
  [Unknown]:  Renner
What is the name of your State or Province?
  [Unknown]:  SD
What is the two-letter country code for this unit?
  [Unknown]:  US
Is CN=localhost, OU=myfear, O=eisele.net, L=Grasbrun, ST=Bavaria, C=ME correct?
  [no]:  yes

Wait a bit now create the berry.cer in the data directory.

sudo -u www-data keytool -export -alias mycert -keystore $JBOSS_HOME/standalone/configuration/berry.jks \
-storepass my_keystore_password -keypass my_keypass_password -rfc -file $JBOSS_HOME/data/berry.cer

Update the wildfly standalone.xml to use my_keystore_password.

sudo sed -i -- 's/my_store_pass/my_keystore_password/g' $JBOSS_HOME/standalone/configuration/standalone.xml

Update the wildfly standalone.xml to use my_keypass_password.

sudo sed -i -- 's/my_key_pass/my_keypass_password/g' $JBOSS_HOME/standalone/configuration/standalone.xml

(Step 10) Start Wildfly And Deploy The Social-ear.ear

Change working directory to the pi home directory.

cd

Start the wildfly server.(Note: None of the log information shown on the screen should be red.)

sudo -u www-data $JBOSS_HOME/bin/standalone.sh

Download the social-ear using google drive. Enter this url in your browser on your workstation.

https://goo.gl/Llyr2I

Use the download option – the down arrow button on the upper right of page.

Use your workstation browser to go wildfly admin-console. Enter this url in your browser.

http://my_internal_ip:9990/console/App.html#standalone-deployments

my_wildfly_admin and my_wildfly_password

Go to the Deployments tab and select the Add button.

Select Upload a new deployment – Next

Select the the social-ear.ear file that was downloaded – should be in your Downloads directory – Next

Finish

Check deployment. Enter this url in your browser.

https://my_internal_ip:8443/social/do

Should see a login screen asking for a User and Password. This is created in (Step 12).

To shutdown wildfly on the pi.

Ctl-c

Configure wildfly to start up with the system. This will start wildfly every time you do a reboot.

sudo cp $JBOSS_HOME/wildfly.service /etc/init.d/wildfly

sudo cp $JBOSS_HOME/wildfly /etc/default

You have created the startup configuration and startup script for wildfly startups. Next run

sudo systemctl enable wildfly

sudo reboot

Check wildfly. Enter this url in your browser. Give the pi time to reboot.

https://192.168.1.20/social/do

(Note) To shutdown wildfly use the following command but leave it running for the rest of the setup.

$JBOSS_HOME/bin/jboss-cli.sh --connect controller=my_internal_ip:9990 command=:shutdown

(Step 11) Configure Your Router For Port Forwarding

The information in this section is going to vary depending on your router. The example given is for a Netgear model wireless router.

Go to the router WPS Wizard -> Advanced Setup -> Port Forwarding/Port Triggering
Add something like Wildfly-HTTPS
Add to the external port range: 443
Add the IP my_internal_ip then click Apply
Then go to the WPS Wizard -> Setup -> Internet Setup and view the IP.

(Step 12) Create A User Account For Raspberry Social

You will need to do this step for each user member you invite to be in your social app. This way no one else on the internet has access except those you invite.

Login to your raspberry pi and enter the following command.

sudo -u www-data $JBOSS_HOME/bin/add-user.sh

This is the dialog that you should see. The correct responses you should type are shown in yellow. Use your own values for NewUser and NewPassword. Also note that the NewPassword will not be shown when typed and you can use a simpler one than what they recommend. The USER,ADMIN roles is needed but you can use just the USER role. The ADMIN role allows the user to delete data records on the pi.

What type of user do you wish to add?
 a) Management User (mgmt-users.properties)
 b) Application User (application-users.properties)
(a): b

Enter the details of the new user to add.
Using realm 'ApplicationRealm' as discovered from the existing property files.
Username : NewUser
Password recommendations are listed below. To modify these restrictions edit the add-user.properties configuration file.
 - The password should be different from the username
 - The password should not be one of the following restricted values {root, admin, administrator}
 - The password should contain at least 8 characters, 1 alphabetic character(s), 1 digit(s), 1 non-alphanumeric symbol(s)
Password : NewPassword
WFLYDM0101: Password should have at least 1 digit.
Are you sure you want to use the password entered yes/no? yes
Re-enter Password : NewPassword
What groups do you want this user to belong to? (Please enter a comma separated list, or leave blank for none)[  ]: USER,ADMIN
About to add user 'NewUser' for realm 'ApplicationRealm'
Is this correct yes/no? yes
Added user 'NewUser' to file '/srv/www/wildfly-10.2.0.Final-SNAPSHOT/standalone/configuration/application-users.properties'
Added user 'NewUser' to file '/srv/www/wildfly-10.2.0.Final-SNAPSHOT/domain/configuration/application-users.properties'
Added user 'NewUser' with groups USER,ADMIN to file '/srv/www/wildfly-10.2.0.Final-SNAPSHOT/standalone/configuration/application-roles.properties'
Added user 'NewUser' with groups USER,ADMIN to file '/srv/www/wildfly-10.2.0.Final-SNAPSHOT/domain/configuration/application-roles.properties'
Is this new user going to be used for one AS process to connect to another AS process?
e.g. for a slave host controller connecting to the master or for a Remoting connection for server to server EJB calls.
yes/no? no

Check the entries by logging in to the Raspberry Social:
https://my_external_ip/social/do
Login with: NewUser and NewPassword

(Step 13) Configure Your Browser For Raspberry Social

These instructions are for the Chrome browser. Adjust for your brand of browser as needed.

First download the cert from your raspberry pi. Enter this url in your browser.

http://my_external_ip/data/berry.cer

The berry.cer should now be in your downloads directory.

Restart Chrome and when you go to the Social website it should show secure.

To test wildfly login and Chrome config enter the following url.

https://my_external_ip/social/do

To login use the NewUser and NewPassword you created in (Step 12).

(Step 14) Register Your Android Device

These instructions are for each Android device you wish to connect to the Raspberry Social App Cloud.

First install the Android Raspberry Social App from the Android Store.

Start the app and select the Settings at the top of the display.

You will see “Not Connected” at the top of the display.

Enter the “Server IP Address”, “Server User”, and “Server Password” using my_external_ip and the NewUser and NewPassword you created in (Step 12).

After this information has been entered, select the “Register” button at the top of the display.

You will see “Connected to server: my_external_ip and assigned device id: 3” at the top of the display.

It should match the screen shot shown below.


After this select the “Return” button and then select the “Sync” button to start your first sync. The sync might take a while and you should see an Alert at the bottom of the Rasberry Pi web page when the sync is completed.