Tasks done for a server creation for sib instance only
Setup way, the startinblox internal one with our own prosody.
- Setup host (app.xyz.startinblox.com or xyz.startinblox.com & api.xyz.startinblox.com) as usual, with forced HTTPS & Python 3.6.8
- Setup Prosody for app.xyz.startinblox.com
ssh root@51.15.243.248
su xmpp
cd
nano prosody.buildout/parts/prosody/etc/prosody/vhost_list # OR vhost_list_startinblox, depending if xyz.happy-dev.fr or xyz.startinblox.com. We don't handle other domains without a bunch more configuration on prosody and a complete server restart.
rlwrap telnet localhost 5582
config:reload()
module:reload('muc_mam', 'conference.app.xyz.startinblox.com')
module:reload('happydev_muc_notify', 'conference.app.xyz.startinblox.com')
module:reload('happydev_muc_admin', 'conference.app.xyz.startinblox.com')
module:reload('auth_oauthbearer', 'app.xyz.startinblox.com')
module:reload('sasl_oauthbearer', 'app.xyz.startinblox.com')
module:reload('mam', 'app.xyz.startinblox.com')
module:reload('groups', 'app.xyz.startinblox.com')
module:reload('happydev_user_admin', 'app.xyz.startinblox.com')
module:reload('happydev_user_notify', 'app.xyz.startinblox.com')
module:reload('happydev_vcard', 'app.xyz.startinblox.com')
# If the server is used only with one client, we could replace the telnet way by a simple complete restart `./bin/prosodyctl restart`. If not, this will disconnect every client and apps will need a reload to work properly.
2.1. If you want it to be joined by distant users you'll need to add DNS registers for conference.app.xyz.startinblox.com
and app.xyz.startinblox.com
. See https://prosody.im/doc/dns
3. Setup DjangoLDP Server
# SSH'ed on host
sib startproject sibserver
nano packages.yml
For a classic SIB App installation (Circles, Project). See Capabilities for more information: https://git.startinblox.com/applications/sib-app#build-the-application
## DjangoLDP packages ##
ldppackages:
djangoldp_account: djangoldp_account
djangoldp_circle: djangoldp_circle
djangoldp_notification: djangoldp_notification
djangoldp_profile: djangoldp_profile
djangoldp_project: djangoldp_project
oidc_provider: 'git+https://github.com/jblemee/django-oidc-provider.git@develop'
## Django server parameters ##
server:
site_url: https://api.xyz.startinblox.com
allowed_hosts:
- api.xyz.startinblox.com
db_host: postgresql-xyz.alwaysdata.net
db_name: xyz_db
db_user: xyz
db_pass: changeme
smtp_host: smtp-xyz.alwaysdata.net
smtp_user: xyz
smtp_pass: changeme
admin_email: xyz-changeme@startinblox.com
admin_name: admin
admin_pass: changeme
xmpp_url: https://jabber.happy-dev.fr
jabber_host: 'app.xyz.startinblox.com' ## Must be the exact same as the one on prosody
sib install sibserver
- Restart server. Login on https://api.xyz.startinblox.com/admin/ (admin / changeme)
- Fill
Ldp sources
with your whole federation. You can see an example on stg1 admin. Values depends on client capabilities & needs, it'll always be the same endpoint as the one filled on the "config.json
". - Fill
Subscriptions
for Prosody, same as above depends on client capabilities & needs. Usual ones will be these:
Object: https://api.xyz.startinblox.com/users/
Inbox: https://jabber.happy-dev.fr/xyz.startinblox.com/happydev_user_admin
Object: https://api.xyz.startinblox.com/projects/
Inbox: https://jabber.happy-dev.fr/conference.xyz.startinblox.com/happydev_muc_admin
Object: https://api.xyz.startinblox.com/circles/
Inbox: https://jabber.happy-dev.fr/conference.xyz.startinblox.com/happydev_muc_admin
- Edit your admin user, you have to add a First name, a last name, and to re-save it for subscription routine to works.
- Add your front-end configuration to gitlab environments, run a build.
Now you can go to https://app.xyz.startinblox.com and login. You must be able to chat with yourself (You'll get no notification on self, try on another user if you want to).