diff --git a/README.md b/README.md index e913b2f..63a9199 100644 --- a/README.md +++ b/README.md @@ -1,11 +1,26 @@ # Multiple Openfires in Docker -This sets up multiple Openfire servers with associated PostgreSQL DBs in Docker containers for local testing. +Quickly create multiple Openfire servers with associated PostgreSQL DBs in Docker containers for local testing. -It relies on an official Postgres Docker image (from Docker Hub) and a local Openfire image, these are referred to in `docker-compose.yml`. The Openfire Docker image can be built using the `Dockerfile` in the root of the Openfire repository (https://github.com/igniterealtime/Openfire): +Data and config snapshots have been taken of each DB and Openfire server so that a known desired state is configured on start. +See the "How it's built" section below if you want to understand how this was done or need to add more nodes. - docker build -t openfire:fmuc . +# Prerequisites +* Docker - https://docs.docker.com/engine/install/ +* Docker Compose - https://docs.docker.com/compose/install/ -Running `./start.sh` will perform some cleanup then start the containers. When running, the system looks like this: + docker build -t openfire:latest . + +# Quick Start +1. Make sure you have docker and docker-compose installed +2. Create a local Openfire docker image, tagged `openfire:latest` that contains the version of Openfire that you want to run + 1. run `docker build -tag openfire:latest .` in the root of the Openfire repository (https://github.com/igniterealtime/Openfire) +3. Launch the environment + 1. use `./start.sh` if you want two **federated** Openfire instances, or + 2. use `./start.sh -c` if you want two **clustered** Openfire instances. + +# Federated configuration +Running `./start.sh` will perform some cleanup then start the containers in a federated configuration. +When running, the system looks like this: ``` +---------------------------------------------+ @@ -19,7 +34,7 @@ Running `./start.sh` will perform some cleanup then start the containers. When r | | | | | +---+--+ +--+---+ | | | | | | | - | | DB 1 | | DB 2 | | +(Database) 5431 -|-------| DB 1 | | DB 2 |-------|- 5432 (Database) | | | | | | | +------+ +------+ | | 172.50.0.11 172.50.0.21 | @@ -27,10 +42,6 @@ Running `./start.sh` will perform some cleanup then start the containers. When r +----------------172.50.0.0/24----------------+ ``` -## Default setup -Data and config snapshots have been taken of each DB and Openfire so that a known desired state is configured on start. -See the "How it's built" section below if you want to understand how this was done or need to add more nodes. - Openfire is configured with the following hostnames/XMPP domain names: * `xmpp1.localhost.example` * `xmpp2.localhost.example` @@ -51,36 +62,80 @@ XMPP 2 hosts the following MUC rooms: * `muc3` * `muc4` -## Network -The Docker compose file defines a custom bridge network with a single subnet `172.50.0.0/24`. -### Removing a node from the network +# Clustered configuration +Running `./start.sh -c` will perform some cleanup then start the containers in a clustered configuration. +When running, the system looks like this: + +``` + +---------------------------------------------+ + | 172.60.0.10 172.60.0.20 | + | +--------+ +--------+ | +(XMPP-C2S) 5221 -| | | | | |- 5222 (XMPP-C2S) +(XMPP-S2S) 5261 -|------| XMPP 1 +============+ XMPP 2 |-------|- 5262 (XMPP-S2S) +(HTTP-Admin) 9091 -| | | | | |- 9092 (HTTP-Admin) + | +----+---+ +----+---+ | + | | | | + | | | | + | +---+--+ | | + | | | | | +(Database) 5432 -|-------| DB +------------------+ | + | | | | + | +------+ | + | 172.60.0.11 | + | | + +----------------172.60.0.0/24----------------+ +``` + +Note that there is no load balancer configured in the setup. + +Openfire is configured with the following XMPP domain: +* `xmpp.localhost.example` + +Openfire is configured with the following hostnames: +* `xmpp1.localhost.example` +* `xmpp2.localhost.example` + +The following users are configured: +* `user1` `password` +* `user2` `password` + +The following MUC rooms are configured: +* `muc1` +* `muc2` + + +# Network +The Docker compose file defines a custom bridge network with a single subnet (`172.50.0.0/24` for the federated +configuration and `172.60.0.0/24` for the clustered). + +## Removing a node from the network To remove a node from the network run the following command: docker network disconnect NETWORK-NAME CONTAINER-NAME For example: - docker network disconnect openfire-testing_net-one openfire-testing_xmpp1_1 - -### Adding a node to the network + docker network disconnect openfire-testing_openfire-federated-net openfire-testing_xmpp1_1 +## Adding a node to the network To add a node to the network fun the following command: docker network connect NETWORK-NAME CONTAINER-NAME For example: - docker network connect openfire-testing_net-one openfire-testing_xmpp1_1 + docker network connect openfire-testing_openfire-federated-net openfire-testing_xmpp1_1 -## How it's built + +# How it's built To recreate the known good state for the system we first create base Openfire and Postgres containers. We then perform the manual setup and any other configuration that we require, such as adding users and MUC rooms. Once the setup is complete we dump the database from the container to the Docker host and copy the Openfire config files from the container to the Docker host. These are then used with Docker volumes for creating the same state in subsequent Openfire and Postgres containers. -### Adding a new node +## Adding a new node Configure a docker-compose file to stand up: 1. a base Openfire container (named `xmpp3`) 1. a base Postgres Docker container (named `db3`) @@ -111,22 +166,22 @@ db3: - "POSTGRES_USER=openfire" - "POSTGRES_PASSWORD=hunter2" networks: - net-one: + openfire-federated-net: ipv4_address: 172.50.0.31 xmpp3: - image: openfire:fmuc + image: openfire:latest ports: - "5223:5222" - "9093:9090" depends_on: - "db3" networks: - net-one: + openfire-federated-net: ipv4_address: 172.50.0.30 networks: - net-one: + openfire-federated-net: driver: bridge ipam: driver: default @@ -154,7 +209,7 @@ Export the Openfire configuration: docker cp openfire-testing_xmpp3_1:/var/lib/openfire/conf ./xmpp/3/ -Add the new node to the main `docker-compose.yml` including the volume definitions to pull in your exported base +Add the new node to the main `docker-compose-federated.yml` including the volume definitions to pull in your exported base configuration data: ``` @@ -169,11 +224,11 @@ db3: volumes: - ./sql/3:/docker-entrypoint-initdb.d networks: - net-one: + openfire-federated-net: ipv4_address: 172.50.0.31 xmpp3: - image: openfire:fmuc + image: openfire:latest ports: - "5223:5222" - "9093:9090" @@ -182,9 +237,9 @@ xmpp3: volumes: - ./_data/xmpp/3/conf:/var/lib/openfire/conf networks: - net-one: + openfire-federated-net: ipv4_address: 172.50.0.30 ... -``` +``` \ No newline at end of file diff --git a/docker-compose-clustered.yml b/docker-compose-clustered.yml new file mode 100644 index 0000000..6157504 --- /dev/null +++ b/docker-compose-clustered.yml @@ -0,0 +1,73 @@ +version: '3.7' + +services: + + db: + image: library/postgres:9.6.17-alpine + ports: + - "5432:5432" + environment: + - "POSTGRES_DB=openfire" + - "POSTGRES_USER=openfire" + - "POSTGRES_PASSWORD=hunter2" + volumes: + - ./sql/clustered/1:/docker-entrypoint-initdb.d + networks: + openfire-clustered-net: + ipv4_address: 172.60.0.11 + + xmpp1: + image: openfire:latest + ports: + - "5221:5222" + - "5261:5269" + - "7071:7070" + - "7441:7443" + - "9091:9090" + depends_on: + - "db" + volumes: + - ./_data/xmpp/clustered/1/conf:/var/lib/openfire/conf + - ./_data/xmpp/clustered/1/plugins/hazelcast.jar:/var/lib/openfire/plugins/hazelcast.jar + - ./wait-for-it.sh:/wait-for-it.sh + command: ["/wait-for-it.sh", "db:5432", "--", "/sbin/entrypoint.sh"] + networks: + openfire-clustered-net: + ipv4_address: 172.60.0.10 + extra_hosts: + - "xmpp1.localhost.example:172.50.0.10" + - "conference.xmpp1.localhost.example:172.50.0.10" + - "xmpp2.localhost.example:172.50.0.20" + - "conference.xmpp2.localhost.example:172.50.0.20" + + xmpp2: + image: openfire:latest + ports: + - "5222:5222" + - "5262:5269" + - "7072:7070" + - "7442:7443" + - "9092:9090" + depends_on: + - "db" + volumes: + - ./_data/xmpp/clustered/2/conf:/var/lib/openfire/conf + - ./_data/xmpp/clustered/2/plugins/hazelcast.jar:/var/lib/openfire/plugins/hazelcast.jar + - ./wait-for-it.sh:/wait-for-it.sh + command: ["/wait-for-it.sh", "db:5432", "--", "/sbin/entrypoint.sh"] + networks: + openfire-clustered-net: + ipv4_address: 172.60.0.20 + extra_hosts: + - "xmpp1.localhost.example:172.50.0.10" + - "conference.xmpp1.localhost.example:172.50.0.10" + - "xmpp2.localhost.example:172.50.0.20" + - "conference.xmpp2.localhost.example:172.50.0.20" + +networks: + openfire-clustered-net: + driver: bridge + ipam: + driver: default + config: + - subnet: 172.60.0.0/24 diff --git a/docker-compose.yml b/docker-compose-federated.yml similarity index 77% rename from docker-compose.yml rename to docker-compose-federated.yml index 7323a4d..7fdfcfe 100644 --- a/docker-compose.yml +++ b/docker-compose-federated.yml @@ -4,30 +4,34 @@ services: db1: image: library/postgres:9.6.17-alpine + ports: + - "5431:5432" environment: - "POSTGRES_DB=openfire" - "POSTGRES_USER=openfire" - "POSTGRES_PASSWORD=hunter2" volumes: - - ./sql/1:/docker-entrypoint-initdb.d + - ./sql/federated/1:/docker-entrypoint-initdb.d networks: - net-one: + openfire-federated-net: ipv4_address: 172.50.0.11 db2: image: library/postgres:9.6.17-alpine + ports: + - "5432:5432" environment: - "POSTGRES_DB=openfire" - "POSTGRES_USER=openfire" - "POSTGRES_PASSWORD=hunter2" volumes: - - ./sql/2:/docker-entrypoint-initdb.d + - ./sql/federated/2:/docker-entrypoint-initdb.d networks: - net-one: + openfire-federated-net: ipv4_address: 172.50.0.21 xmpp1: - image: openfire:fmuc + image: openfire:latest ports: - "5221:5222" - "5261:5269" @@ -37,11 +41,11 @@ services: depends_on: - "db1" volumes: - - ./_data/xmpp/1/conf:/var/lib/openfire/conf + - ./_data/xmpp/federated/1/conf:/var/lib/openfire/conf - ./wait-for-it.sh:/wait-for-it.sh command: ["/wait-for-it.sh", "db1:5432", "--", "/sbin/entrypoint.sh"] networks: - net-one: + openfire-federated-net: ipv4_address: 172.50.0.10 extra_hosts: - "xmpp1.localhost.example:172.50.0.10" @@ -50,7 +54,7 @@ services: - "conference.xmpp2.localhost.example:172.50.0.20" xmpp2: - image: openfire:fmuc + image: openfire:latest ports: - "5222:5222" - "5262:5269" @@ -60,11 +64,11 @@ services: depends_on: - "db2" volumes: - - ./_data/xmpp/2/conf:/var/lib/openfire/conf + - ./_data/xmpp/federated/2/conf:/var/lib/openfire/conf - ./wait-for-it.sh:/wait-for-it.sh command: ["/wait-for-it.sh", "db2:5432", "--", "/sbin/entrypoint.sh"] networks: - net-one: + openfire-federated-net: ipv4_address: 172.50.0.20 extra_hosts: - "xmpp1.localhost.example:172.50.0.10" @@ -73,7 +77,7 @@ services: - "conference.xmpp2.localhost.example:172.50.0.20" networks: - net-one: + openfire-federated-net: driver: bridge ipam: driver: default diff --git a/sql/clustered/1/openfire.sql b/sql/clustered/1/openfire.sql new file mode 100644 index 0000000..23749bc --- /dev/null +++ b/sql/clustered/1/openfire.sql @@ -0,0 +1,1243 @@ +-- +-- PostgreSQL database dump +-- + +-- Dumped from database version 9.6.17 +-- Dumped by pg_dump version 9.6.17 + +SET statement_timeout = 0; +SET lock_timeout = 0; +SET idle_in_transaction_session_timeout = 0; +SET client_encoding = 'UTF8'; +SET standard_conforming_strings = on; +SELECT pg_catalog.set_config('search_path', '', false); +SET check_function_bodies = false; +SET xmloption = content; +SET client_min_messages = warning; +SET row_security = off; + +-- +-- Name: plpgsql; Type: EXTENSION; Schema: -; Owner: +-- + +CREATE EXTENSION IF NOT EXISTS plpgsql WITH SCHEMA pg_catalog; + + +-- +-- Name: EXTENSION plpgsql; Type: COMMENT; Schema: -; Owner: +-- + +COMMENT ON EXTENSION plpgsql IS 'PL/pgSQL procedural language'; + + +SET default_tablespace = ''; + +SET default_with_oids = false; + +-- +-- Name: ofextcomponentconf; Type: TABLE; Schema: public; Owner: openfire +-- + +CREATE TABLE public.ofextcomponentconf ( + subdomain character varying(255) NOT NULL, + wildcard integer NOT NULL, + secret character varying(255), + permission character varying(10) NOT NULL +); + + +ALTER TABLE public.ofextcomponentconf OWNER TO openfire; + +-- +-- Name: ofgroup; Type: TABLE; Schema: public; Owner: openfire +-- + +CREATE TABLE public.ofgroup ( + groupname character varying(50) NOT NULL, + description character varying(255) +); + + +ALTER TABLE public.ofgroup OWNER TO openfire; + +-- +-- Name: ofgroupprop; Type: TABLE; Schema: public; Owner: openfire +-- + +CREATE TABLE public.ofgroupprop ( + groupname character varying(50) NOT NULL, + name character varying(100) NOT NULL, + propvalue text NOT NULL +); + + +ALTER TABLE public.ofgroupprop OWNER TO openfire; + +-- +-- Name: ofgroupuser; Type: TABLE; Schema: public; Owner: openfire +-- + +CREATE TABLE public.ofgroupuser ( + groupname character varying(50) NOT NULL, + username character varying(100) NOT NULL, + administrator integer NOT NULL +); + + +ALTER TABLE public.ofgroupuser OWNER TO openfire; + +-- +-- Name: ofid; Type: TABLE; Schema: public; Owner: openfire +-- + +CREATE TABLE public.ofid ( + idtype integer NOT NULL, + id integer NOT NULL +); + + +ALTER TABLE public.ofid OWNER TO openfire; + +-- +-- Name: ofmucaffiliation; Type: TABLE; Schema: public; Owner: openfire +-- + +CREATE TABLE public.ofmucaffiliation ( + roomid integer NOT NULL, + jid character varying(1024) NOT NULL, + affiliation integer NOT NULL +); + + +ALTER TABLE public.ofmucaffiliation OWNER TO openfire; + +-- +-- Name: ofmucconversationlog; Type: TABLE; Schema: public; Owner: openfire +-- + +CREATE TABLE public.ofmucconversationlog ( + roomid integer NOT NULL, + messageid integer NOT NULL, + sender character varying(1024) NOT NULL, + nickname character varying(255), + logtime character(15) NOT NULL, + subject character varying(255), + body text, + stanza text +); + + +ALTER TABLE public.ofmucconversationlog OWNER TO openfire; + +-- +-- Name: ofmucmember; Type: TABLE; Schema: public; Owner: openfire +-- + +CREATE TABLE public.ofmucmember ( + roomid integer NOT NULL, + jid character varying(1024) NOT NULL, + nickname character varying(255), + firstname character varying(100), + lastname character varying(100), + url character varying(100), + email character varying(100), + faqentry character varying(100) +); + + +ALTER TABLE public.ofmucmember OWNER TO openfire; + +-- +-- Name: ofmucroom; Type: TABLE; Schema: public; Owner: openfire +-- + +CREATE TABLE public.ofmucroom ( + serviceid integer NOT NULL, + roomid integer NOT NULL, + creationdate character(15) NOT NULL, + modificationdate character(15) NOT NULL, + name character varying(50) NOT NULL, + naturalname character varying(255) NOT NULL, + description character varying(255), + lockeddate character(15) NOT NULL, + emptydate character(15), + canchangesubject integer NOT NULL, + maxusers integer NOT NULL, + publicroom integer NOT NULL, + moderated integer NOT NULL, + membersonly integer NOT NULL, + caninvite integer NOT NULL, + roompassword character varying(50), + candiscoverjid integer NOT NULL, + logenabled integer NOT NULL, + subject character varying(100), + rolestobroadcast integer NOT NULL, + usereservednick integer NOT NULL, + canchangenick integer NOT NULL, + canregister integer NOT NULL, + allowpm integer, + fmucenabled integer, + fmucoutboundnode text, + fmucoutboundmode integer, + fmucinboundnodes text +); + + +ALTER TABLE public.ofmucroom OWNER TO openfire; + +-- +-- Name: ofmucroomprop; Type: TABLE; Schema: public; Owner: openfire +-- + +CREATE TABLE public.ofmucroomprop ( + roomid integer NOT NULL, + name character varying(100) NOT NULL, + propvalue text NOT NULL +); + + +ALTER TABLE public.ofmucroomprop OWNER TO openfire; + +-- +-- Name: ofmucservice; Type: TABLE; Schema: public; Owner: openfire +-- + +CREATE TABLE public.ofmucservice ( + serviceid integer NOT NULL, + subdomain character varying(255) NOT NULL, + description character varying(255), + ishidden integer NOT NULL +); + + +ALTER TABLE public.ofmucservice OWNER TO openfire; + +-- +-- Name: ofmucserviceprop; Type: TABLE; Schema: public; Owner: openfire +-- + +CREATE TABLE public.ofmucserviceprop ( + serviceid integer NOT NULL, + name character varying(100) NOT NULL, + propvalue text NOT NULL +); + + +ALTER TABLE public.ofmucserviceprop OWNER TO openfire; + +-- +-- Name: ofoffline; Type: TABLE; Schema: public; Owner: openfire +-- + +CREATE TABLE public.ofoffline ( + username character varying(64) NOT NULL, + messageid integer NOT NULL, + creationdate character(15) NOT NULL, + messagesize integer NOT NULL, + stanza text NOT NULL +); + + +ALTER TABLE public.ofoffline OWNER TO openfire; + +-- +-- Name: ofpresence; Type: TABLE; Schema: public; Owner: openfire +-- + +CREATE TABLE public.ofpresence ( + username character varying(64) NOT NULL, + offlinepresence text, + offlinedate character varying(15) NOT NULL +); + + +ALTER TABLE public.ofpresence OWNER TO openfire; + +-- +-- Name: ofprivacylist; Type: TABLE; Schema: public; Owner: openfire +-- + +CREATE TABLE public.ofprivacylist ( + username character varying(64) NOT NULL, + name character varying(100) NOT NULL, + isdefault integer NOT NULL, + list text NOT NULL +); + + +ALTER TABLE public.ofprivacylist OWNER TO openfire; + +-- +-- Name: ofproperty; Type: TABLE; Schema: public; Owner: openfire +-- + +CREATE TABLE public.ofproperty ( + name character varying(100) NOT NULL, + propvalue character varying(4000) NOT NULL, + encrypted integer, + iv character(24) +); + + +ALTER TABLE public.ofproperty OWNER TO openfire; + +-- +-- Name: ofpubsubaffiliation; Type: TABLE; Schema: public; Owner: openfire +-- + +CREATE TABLE public.ofpubsubaffiliation ( + serviceid character varying(100) NOT NULL, + nodeid character varying(100) NOT NULL, + jid character varying(1024) NOT NULL, + affiliation character varying(10) NOT NULL +); + + +ALTER TABLE public.ofpubsubaffiliation OWNER TO openfire; + +-- +-- Name: ofpubsubdefaultconf; Type: TABLE; Schema: public; Owner: openfire +-- + +CREATE TABLE public.ofpubsubdefaultconf ( + serviceid character varying(100) NOT NULL, + leaf integer NOT NULL, + deliverpayloads integer NOT NULL, + maxpayloadsize integer NOT NULL, + persistitems integer NOT NULL, + maxitems integer NOT NULL, + notifyconfigchanges integer NOT NULL, + notifydelete integer NOT NULL, + notifyretract integer NOT NULL, + presencebased integer NOT NULL, + senditemsubscribe integer NOT NULL, + publishermodel character varying(15) NOT NULL, + subscriptionenabled integer NOT NULL, + accessmodel character varying(10) NOT NULL, + language character varying(255), + replypolicy character varying(15), + associationpolicy character varying(15) NOT NULL, + maxleafnodes integer NOT NULL +); + + +ALTER TABLE public.ofpubsubdefaultconf OWNER TO openfire; + +-- +-- Name: ofpubsubitem; Type: TABLE; Schema: public; Owner: openfire +-- + +CREATE TABLE public.ofpubsubitem ( + serviceid character varying(100) NOT NULL, + nodeid character varying(100) NOT NULL, + id character varying(100) NOT NULL, + jid character varying(1024) NOT NULL, + creationdate character(15) NOT NULL, + payload text +); + + +ALTER TABLE public.ofpubsubitem OWNER TO openfire; + +-- +-- Name: ofpubsubnode; Type: TABLE; Schema: public; Owner: openfire +-- + +CREATE TABLE public.ofpubsubnode ( + serviceid character varying(100) NOT NULL, + nodeid character varying(100) NOT NULL, + leaf integer NOT NULL, + creationdate character(15) NOT NULL, + modificationdate character(15) NOT NULL, + parent character varying(100), + deliverpayloads integer NOT NULL, + maxpayloadsize integer, + persistitems integer, + maxitems integer, + notifyconfigchanges integer NOT NULL, + notifydelete integer NOT NULL, + notifyretract integer NOT NULL, + presencebased integer NOT NULL, + senditemsubscribe integer NOT NULL, + publishermodel character varying(15) NOT NULL, + subscriptionenabled integer NOT NULL, + configsubscription integer NOT NULL, + accessmodel character varying(10) NOT NULL, + payloadtype character varying(100), + bodyxslt character varying(100), + dataformxslt character varying(100), + creator character varying(1024) NOT NULL, + description character varying(255), + language character varying(255), + name character varying(50), + replypolicy character varying(15), + associationpolicy character varying(15), + maxleafnodes integer +); + + +ALTER TABLE public.ofpubsubnode OWNER TO openfire; + +-- +-- Name: ofpubsubnodegroups; Type: TABLE; Schema: public; Owner: openfire +-- + +CREATE TABLE public.ofpubsubnodegroups ( + serviceid character varying(100) NOT NULL, + nodeid character varying(100) NOT NULL, + rostergroup character varying(100) NOT NULL +); + + +ALTER TABLE public.ofpubsubnodegroups OWNER TO openfire; + +-- +-- Name: ofpubsubnodejids; Type: TABLE; Schema: public; Owner: openfire +-- + +CREATE TABLE public.ofpubsubnodejids ( + serviceid character varying(100) NOT NULL, + nodeid character varying(100) NOT NULL, + jid character varying(1024) NOT NULL, + associationtype character varying(20) NOT NULL +); + + +ALTER TABLE public.ofpubsubnodejids OWNER TO openfire; + +-- +-- Name: ofpubsubsubscription; Type: TABLE; Schema: public; Owner: openfire +-- + +CREATE TABLE public.ofpubsubsubscription ( + serviceid character varying(100) NOT NULL, + nodeid character varying(100) NOT NULL, + id character varying(100) NOT NULL, + jid character varying(1024) NOT NULL, + owner character varying(1024) NOT NULL, + state character varying(15) NOT NULL, + deliver integer NOT NULL, + digest integer NOT NULL, + digest_frequency integer NOT NULL, + expire character(15), + includebody integer NOT NULL, + showvalues character varying(30) NOT NULL, + subscriptiontype character varying(10) NOT NULL, + subscriptiondepth integer NOT NULL, + keyword character varying(200) +); + + +ALTER TABLE public.ofpubsubsubscription OWNER TO openfire; + +-- +-- Name: ofremoteserverconf; Type: TABLE; Schema: public; Owner: openfire +-- + +CREATE TABLE public.ofremoteserverconf ( + xmppdomain character varying(255) NOT NULL, + remoteport integer, + permission character varying(10) NOT NULL +); + + +ALTER TABLE public.ofremoteserverconf OWNER TO openfire; + +-- +-- Name: ofroster; Type: TABLE; Schema: public; Owner: openfire +-- + +CREATE TABLE public.ofroster ( + rosterid integer NOT NULL, + username character varying(64) NOT NULL, + jid character varying(1024) NOT NULL, + sub integer NOT NULL, + ask integer NOT NULL, + recv integer NOT NULL, + nick character varying(255) +); + + +ALTER TABLE public.ofroster OWNER TO openfire; + +-- +-- Name: ofrostergroups; Type: TABLE; Schema: public; Owner: openfire +-- + +CREATE TABLE public.ofrostergroups ( + rosterid integer NOT NULL, + rank integer NOT NULL, + groupname character varying(255) NOT NULL +); + + +ALTER TABLE public.ofrostergroups OWNER TO openfire; + +-- +-- Name: ofsaslauthorized; Type: TABLE; Schema: public; Owner: openfire +-- + +CREATE TABLE public.ofsaslauthorized ( + username character varying(64) NOT NULL, + principal character varying(4000) NOT NULL +); + + +ALTER TABLE public.ofsaslauthorized OWNER TO openfire; + +-- +-- Name: ofsecurityauditlog; Type: TABLE; Schema: public; Owner: openfire +-- + +CREATE TABLE public.ofsecurityauditlog ( + msgid integer NOT NULL, + username character varying(64) NOT NULL, + entrystamp bigint NOT NULL, + summary character varying(255) NOT NULL, + node character varying(255) NOT NULL, + details text +); + + +ALTER TABLE public.ofsecurityauditlog OWNER TO openfire; + +-- +-- Name: ofuser; Type: TABLE; Schema: public; Owner: openfire +-- + +CREATE TABLE public.ofuser ( + username character varying(64) NOT NULL, + storedkey character varying(32), + serverkey character varying(32), + salt character varying(32), + iterations integer, + plainpassword character varying(32), + encryptedpassword character varying(255), + name character varying(100), + email character varying(100), + creationdate character(15) NOT NULL, + modificationdate character(15) NOT NULL +); + + +ALTER TABLE public.ofuser OWNER TO openfire; + +-- +-- Name: ofuserflag; Type: TABLE; Schema: public; Owner: openfire +-- + +CREATE TABLE public.ofuserflag ( + username character varying(64) NOT NULL, + name character varying(100) NOT NULL, + starttime character(15), + endtime character(15) +); + + +ALTER TABLE public.ofuserflag OWNER TO openfire; + +-- +-- Name: ofuserprop; Type: TABLE; Schema: public; Owner: openfire +-- + +CREATE TABLE public.ofuserprop ( + username character varying(64) NOT NULL, + name character varying(100) NOT NULL, + propvalue text NOT NULL +); + + +ALTER TABLE public.ofuserprop OWNER TO openfire; + +-- +-- Name: ofvcard; Type: TABLE; Schema: public; Owner: openfire +-- + +CREATE TABLE public.ofvcard ( + username character varying(64) NOT NULL, + vcard text NOT NULL +); + + +ALTER TABLE public.ofvcard OWNER TO openfire; + +-- +-- Name: ofversion; Type: TABLE; Schema: public; Owner: openfire +-- + +CREATE TABLE public.ofversion ( + name character varying(50) NOT NULL, + version integer NOT NULL +); + + +ALTER TABLE public.ofversion OWNER TO openfire; + +-- +-- Data for Name: ofextcomponentconf; Type: TABLE DATA; Schema: public; Owner: openfire +-- + +COPY public.ofextcomponentconf (subdomain, wildcard, secret, permission) FROM stdin; +\. + + +-- +-- Data for Name: ofgroup; Type: TABLE DATA; Schema: public; Owner: openfire +-- + +COPY public.ofgroup (groupname, description) FROM stdin; +\. + + +-- +-- Data for Name: ofgroupprop; Type: TABLE DATA; Schema: public; Owner: openfire +-- + +COPY public.ofgroupprop (groupname, name, propvalue) FROM stdin; +\. + + +-- +-- Data for Name: ofgroupuser; Type: TABLE DATA; Schema: public; Owner: openfire +-- + +COPY public.ofgroupuser (groupname, username, administrator) FROM stdin; +\. + + +-- +-- Data for Name: ofid; Type: TABLE DATA; Schema: public; Owner: openfire +-- + +COPY public.ofid (idtype, id) FROM stdin; +18 1 +19 1 +26 2 +23 6 +27 51 +25 7 +\. + + +-- +-- Data for Name: ofmucaffiliation; Type: TABLE DATA; Schema: public; Owner: openfire +-- + +COPY public.ofmucaffiliation (roomid, jid, affiliation) FROM stdin; +1 admin@xmpp.localhost.example 10 +2 admin@xmpp.localhost.example 10 +\. + + +-- +-- Data for Name: ofmucconversationlog; Type: TABLE DATA; Schema: public; Owner: openfire +-- + +COPY public.ofmucconversationlog (roomid, messageid, sender, nickname, logtime, subject, body, stanza) FROM stdin; +1 1 muc1@conference.xmpp.localhost.example \N 001605193216988 \N +2 2 muc2@conference.xmpp.localhost.example \N 001605193235014 \N +\. + + +-- +-- Data for Name: ofmucmember; Type: TABLE DATA; Schema: public; Owner: openfire +-- + +COPY public.ofmucmember (roomid, jid, nickname, firstname, lastname, url, email, faqentry) FROM stdin; +\. + + +-- +-- Data for Name: ofmucroom; Type: TABLE DATA; Schema: public; Owner: openfire +-- + +COPY public.ofmucroom (serviceid, roomid, creationdate, modificationdate, name, naturalname, description, lockeddate, emptydate, canchangesubject, maxusers, publicroom, moderated, membersonly, caninvite, roompassword, candiscoverjid, logenabled, subject, rolestobroadcast, usereservednick, canchangenick, canregister, allowpm, fmucenabled, fmucoutboundnode, fmucoutboundmode, fmucinboundnodes) FROM stdin; +1 1 001605193216969 001605193216979 muc1 MUC One First MUC room 000000000000000 \N 0 30 1 0 0 0 \N 1 1 7 0 1 1 0 0 \N \N \N +1 2 001605193235007 001605193235010 muc2 MUC Two Second MUC room 000000000000000 \N 0 30 1 0 0 0 \N 1 1 7 0 1 1 0 0 \N \N \N +\. + + +-- +-- Data for Name: ofmucroomprop; Type: TABLE DATA; Schema: public; Owner: openfire +-- + +COPY public.ofmucroomprop (roomid, name, propvalue) FROM stdin; +\. + + +-- +-- Data for Name: ofmucservice; Type: TABLE DATA; Schema: public; Owner: openfire +-- + +COPY public.ofmucservice (serviceid, subdomain, description, ishidden) FROM stdin; +1 conference \N 0 +\. + + +-- +-- Data for Name: ofmucserviceprop; Type: TABLE DATA; Schema: public; Owner: openfire +-- + +COPY public.ofmucserviceprop (serviceid, name, propvalue) FROM stdin; +\. + + +-- +-- Data for Name: ofoffline; Type: TABLE DATA; Schema: public; Owner: openfire +-- + +COPY public.ofoffline (username, messageid, creationdate, messagesize, stanza) FROM stdin; +\. + + +-- +-- Data for Name: ofpresence; Type: TABLE DATA; Schema: public; Owner: openfire +-- + +COPY public.ofpresence (username, offlinepresence, offlinedate) FROM stdin; +\. + + +-- +-- Data for Name: ofprivacylist; Type: TABLE DATA; Schema: public; Owner: openfire +-- + +COPY public.ofprivacylist (username, name, isdefault, list) FROM stdin; +\. + + +-- +-- Data for Name: ofproperty; Type: TABLE DATA; Schema: public; Owner: openfire +-- + +COPY public.ofproperty (name, propvalue, encrypted, iv) FROM stdin; +xmpp.socket.ssl.active true 0 \N +provider.admin.className org.jivesoftware.openfire.admin.DefaultAdminProvider 0 \N +xmpp.domain xmpp.localhost.example 0 \N +xmpp.auth.anonymous false 0 \N +provider.auth.className org.jivesoftware.openfire.auth.DefaultAuthProvider 0 \N +provider.lockout.className org.jivesoftware.openfire.lockout.DefaultLockOutProvider 0 \N +provider.group.className org.jivesoftware.openfire.group.DefaultGroupProvider 0 \N +provider.vcard.className org.jivesoftware.openfire.vcard.DefaultVCardProvider 0 \N +provider.securityAudit.className org.jivesoftware.openfire.security.DefaultSecurityAuditProvider 0 \N +provider.user.className org.jivesoftware.openfire.user.DefaultUserProvider 0 \N +update.lastCheck 1605193114947 0 \N +passwordKey YJ1nKWyrMeGvTKu 0 \N +\. + + +-- +-- Data for Name: ofpubsubaffiliation; Type: TABLE DATA; Schema: public; Owner: openfire +-- + +COPY public.ofpubsubaffiliation (serviceid, nodeid, jid, affiliation) FROM stdin; +pubsub xmpp.localhost.example owner +\. + + +-- +-- Data for Name: ofpubsubdefaultconf; Type: TABLE DATA; Schema: public; Owner: openfire +-- + +COPY public.ofpubsubdefaultconf (serviceid, leaf, deliverpayloads, maxpayloadsize, persistitems, maxitems, notifyconfigchanges, notifydelete, notifyretract, presencebased, senditemsubscribe, publishermodel, subscriptionenabled, accessmodel, language, replypolicy, associationpolicy, maxleafnodes) FROM stdin; +pubsub 1 1 10485760 0 1 1 1 1 0 1 publishers 1 open English \N all -1 +pubsub 0 0 0 0 0 1 1 1 0 0 publishers 1 open English \N all -1 +\. + + +-- +-- Data for Name: ofpubsubitem; Type: TABLE DATA; Schema: public; Owner: openfire +-- + +COPY public.ofpubsubitem (serviceid, nodeid, id, jid, creationdate, payload) FROM stdin; +\. + + +-- +-- Data for Name: ofpubsubnode; Type: TABLE DATA; Schema: public; Owner: openfire +-- + +COPY public.ofpubsubnode (serviceid, nodeid, leaf, creationdate, modificationdate, parent, deliverpayloads, maxpayloadsize, persistitems, maxitems, notifyconfigchanges, notifydelete, notifyretract, presencebased, senditemsubscribe, publishermodel, subscriptionenabled, configsubscription, accessmodel, payloadtype, bodyxslt, dataformxslt, creator, description, language, name, replypolicy, associationpolicy, maxleafnodes) FROM stdin; +pubsub 0 001605193079586 001605193079586 \N 0 0 0 0 1 1 1 0 0 publishers 1 0 open xmpp.localhost.example English \N all -1 +\. + + +-- +-- Data for Name: ofpubsubnodegroups; Type: TABLE DATA; Schema: public; Owner: openfire +-- + +COPY public.ofpubsubnodegroups (serviceid, nodeid, rostergroup) FROM stdin; +\. + + +-- +-- Data for Name: ofpubsubnodejids; Type: TABLE DATA; Schema: public; Owner: openfire +-- + +COPY public.ofpubsubnodejids (serviceid, nodeid, jid, associationtype) FROM stdin; +\. + + +-- +-- Data for Name: ofpubsubsubscription; Type: TABLE DATA; Schema: public; Owner: openfire +-- + +COPY public.ofpubsubsubscription (serviceid, nodeid, id, jid, owner, state, deliver, digest, digest_frequency, expire, includebody, showvalues, subscriptiontype, subscriptiondepth, keyword) FROM stdin; +\. + + +-- +-- Data for Name: ofremoteserverconf; Type: TABLE DATA; Schema: public; Owner: openfire +-- + +COPY public.ofremoteserverconf (xmppdomain, remoteport, permission) FROM stdin; +\. + + +-- +-- Data for Name: ofroster; Type: TABLE DATA; Schema: public; Owner: openfire +-- + +COPY public.ofroster (rosterid, username, jid, sub, ask, recv, nick) FROM stdin; +\. + + +-- +-- Data for Name: ofrostergroups; Type: TABLE DATA; Schema: public; Owner: openfire +-- + +COPY public.ofrostergroups (rosterid, rank, groupname) FROM stdin; +\. + + +-- +-- Data for Name: ofsaslauthorized; Type: TABLE DATA; Schema: public; Owner: openfire +-- + +COPY public.ofsaslauthorized (username, principal) FROM stdin; +\. + + +-- +-- Data for Name: ofsecurityauditlog; Type: TABLE DATA; Schema: public; Owner: openfire +-- + +COPY public.ofsecurityauditlog (msgid, username, entrystamp, summary, node, details) FROM stdin; +1 admin 1605193086180 Successful admin console login attempt xmpp1.localhost.example The user logged in successfully to the admin console from address 172.60.0.1. +2 admin 1605193121343 enabled clustering xmpp1.localhost.example \N +3 admin 1605193167191 created new user user1 xmpp1.localhost.example name = User One, email = null, admin = false +4 admin 1605193178661 created new user user2 xmpp1.localhost.example name = User Two, email = null, admin = false +5 admin 1605193216992 created new MUC room muc1 xmpp1.localhost.example subject = \nroomdesc = First MUC room\nroomname = MUC One\nmaxusers = 30 +6 admin 1605193235018 created new MUC room muc2 xmpp1.localhost.example subject = \nroomdesc = Second MUC room\nroomname = MUC Two\nmaxusers = 30 +\. + + +-- +-- Data for Name: ofuser; Type: TABLE DATA; Schema: public; Owner: openfire +-- + +COPY public.ofuser (username, storedkey, serverkey, salt, iterations, plainpassword, encryptedpassword, name, email, creationdate, modificationdate) FROM stdin; +admin \N \N \N \N admin \N Administrator admin@example.com 0 0 +user1 bwwYjdvCySlDbPP8ThRhIRPNIsg= kghyw1bnKARQIQFnq1ro4EeC24s= 2q5Haus5PeiKO6T0U7BWPW6p+6B2xNPv 4096 \N d8835ca5c85385d31b06e30d0479559f241d3c6c9bfe37b5a2ee228a258a73b8 User One \N 001605193167159 001605193167159 +user2 qQZJ/YRNwP4ongfV375LPUlDkeE= t0pnVWMK/9MAEBGYka0bNJfYe/Q= nl9R20qgvMHcet0lZVPFuzH0gVs32naO 4096 \N 58af7cf2b2717559f2d4a8b642257fbbb5f60763989294d1698e647b332d8ca7 User Two \N 001605193178643 001605193178643 +\. + + +-- +-- Data for Name: ofuserflag; Type: TABLE DATA; Schema: public; Owner: openfire +-- + +COPY public.ofuserflag (username, name, starttime, endtime) FROM stdin; +\. + + +-- +-- Data for Name: ofuserprop; Type: TABLE DATA; Schema: public; Owner: openfire +-- + +COPY public.ofuserprop (username, name, propvalue) FROM stdin; +\. + + +-- +-- Data for Name: ofvcard; Type: TABLE DATA; Schema: public; Owner: openfire +-- + +COPY public.ofvcard (username, vcard) FROM stdin; +\. + + +-- +-- Data for Name: ofversion; Type: TABLE DATA; Schema: public; Owner: openfire +-- + +COPY public.ofversion (name, version) FROM stdin; +openfire 32 +\. + + +-- +-- Name: ofextcomponentconf ofextcomponentconf_pk; Type: CONSTRAINT; Schema: public; Owner: openfire +-- + +ALTER TABLE ONLY public.ofextcomponentconf + ADD CONSTRAINT ofextcomponentconf_pk PRIMARY KEY (subdomain); + + +-- +-- Name: ofgroup ofgroup_pk; Type: CONSTRAINT; Schema: public; Owner: openfire +-- + +ALTER TABLE ONLY public.ofgroup + ADD CONSTRAINT ofgroup_pk PRIMARY KEY (groupname); + + +-- +-- Name: ofgroupprop ofgroupprop_pk; Type: CONSTRAINT; Schema: public; Owner: openfire +-- + +ALTER TABLE ONLY public.ofgroupprop + ADD CONSTRAINT ofgroupprop_pk PRIMARY KEY (groupname, name); + + +-- +-- Name: ofgroupuser ofgroupuser_pk; Type: CONSTRAINT; Schema: public; Owner: openfire +-- + +ALTER TABLE ONLY public.ofgroupuser + ADD CONSTRAINT ofgroupuser_pk PRIMARY KEY (groupname, username, administrator); + + +-- +-- Name: ofid ofid_pk; Type: CONSTRAINT; Schema: public; Owner: openfire +-- + +ALTER TABLE ONLY public.ofid + ADD CONSTRAINT ofid_pk PRIMARY KEY (idtype); + + +-- +-- Name: ofmucaffiliation ofmucaffiliation_pk; Type: CONSTRAINT; Schema: public; Owner: openfire +-- + +ALTER TABLE ONLY public.ofmucaffiliation + ADD CONSTRAINT ofmucaffiliation_pk PRIMARY KEY (roomid, jid); + + +-- +-- Name: ofmucmember ofmucmember_pk; Type: CONSTRAINT; Schema: public; Owner: openfire +-- + +ALTER TABLE ONLY public.ofmucmember + ADD CONSTRAINT ofmucmember_pk PRIMARY KEY (roomid, jid); + + +-- +-- Name: ofmucroom ofmucroom_pk; Type: CONSTRAINT; Schema: public; Owner: openfire +-- + +ALTER TABLE ONLY public.ofmucroom + ADD CONSTRAINT ofmucroom_pk PRIMARY KEY (serviceid, name); + + +-- +-- Name: ofmucroomprop ofmucroomprop_pk; Type: CONSTRAINT; Schema: public; Owner: openfire +-- + +ALTER TABLE ONLY public.ofmucroomprop + ADD CONSTRAINT ofmucroomprop_pk PRIMARY KEY (roomid, name); + + +-- +-- Name: ofmucservice ofmucservice_pk; Type: CONSTRAINT; Schema: public; Owner: openfire +-- + +ALTER TABLE ONLY public.ofmucservice + ADD CONSTRAINT ofmucservice_pk PRIMARY KEY (subdomain); + + +-- +-- Name: ofmucserviceprop ofmucserviceprop_pk; Type: CONSTRAINT; Schema: public; Owner: openfire +-- + +ALTER TABLE ONLY public.ofmucserviceprop + ADD CONSTRAINT ofmucserviceprop_pk PRIMARY KEY (serviceid, name); + + +-- +-- Name: ofoffline ofoffline_pk; Type: CONSTRAINT; Schema: public; Owner: openfire +-- + +ALTER TABLE ONLY public.ofoffline + ADD CONSTRAINT ofoffline_pk PRIMARY KEY (username, messageid); + + +-- +-- Name: ofpresence ofpresence_pk; Type: CONSTRAINT; Schema: public; Owner: openfire +-- + +ALTER TABLE ONLY public.ofpresence + ADD CONSTRAINT ofpresence_pk PRIMARY KEY (username); + + +-- +-- Name: ofprivacylist ofprivacylist_pk; Type: CONSTRAINT; Schema: public; Owner: openfire +-- + +ALTER TABLE ONLY public.ofprivacylist + ADD CONSTRAINT ofprivacylist_pk PRIMARY KEY (username, name); + + +-- +-- Name: ofproperty ofproperty_pk; Type: CONSTRAINT; Schema: public; Owner: openfire +-- + +ALTER TABLE ONLY public.ofproperty + ADD CONSTRAINT ofproperty_pk PRIMARY KEY (name); + + +-- +-- Name: ofpubsubaffiliation ofpubsubaffiliation_pk; Type: CONSTRAINT; Schema: public; Owner: openfire +-- + +ALTER TABLE ONLY public.ofpubsubaffiliation + ADD CONSTRAINT ofpubsubaffiliation_pk PRIMARY KEY (serviceid, nodeid, jid); + + +-- +-- Name: ofpubsubdefaultconf ofpubsubdefaultconf_pk; Type: CONSTRAINT; Schema: public; Owner: openfire +-- + +ALTER TABLE ONLY public.ofpubsubdefaultconf + ADD CONSTRAINT ofpubsubdefaultconf_pk PRIMARY KEY (serviceid, leaf); + + +-- +-- Name: ofpubsubitem ofpubsubitem_pk; Type: CONSTRAINT; Schema: public; Owner: openfire +-- + +ALTER TABLE ONLY public.ofpubsubitem + ADD CONSTRAINT ofpubsubitem_pk PRIMARY KEY (serviceid, nodeid, id); + + +-- +-- Name: ofpubsubnode ofpubsubnode_pk; Type: CONSTRAINT; Schema: public; Owner: openfire +-- + +ALTER TABLE ONLY public.ofpubsubnode + ADD CONSTRAINT ofpubsubnode_pk PRIMARY KEY (serviceid, nodeid); + + +-- +-- Name: ofpubsubnodejids ofpubsubnodejids_pk; Type: CONSTRAINT; Schema: public; Owner: openfire +-- + +ALTER TABLE ONLY public.ofpubsubnodejids + ADD CONSTRAINT ofpubsubnodejids_pk PRIMARY KEY (serviceid, nodeid, jid); + + +-- +-- Name: ofpubsubsubscription ofpubsubsubscription_pk; Type: CONSTRAINT; Schema: public; Owner: openfire +-- + +ALTER TABLE ONLY public.ofpubsubsubscription + ADD CONSTRAINT ofpubsubsubscription_pk PRIMARY KEY (serviceid, nodeid, id); + + +-- +-- Name: ofremoteserverconf ofremoteserverconf_pk; Type: CONSTRAINT; Schema: public; Owner: openfire +-- + +ALTER TABLE ONLY public.ofremoteserverconf + ADD CONSTRAINT ofremoteserverconf_pk PRIMARY KEY (xmppdomain); + + +-- +-- Name: ofroster ofroster_pk; Type: CONSTRAINT; Schema: public; Owner: openfire +-- + +ALTER TABLE ONLY public.ofroster + ADD CONSTRAINT ofroster_pk PRIMARY KEY (rosterid); + + +-- +-- Name: ofrostergroups ofrostergroups_pk; Type: CONSTRAINT; Schema: public; Owner: openfire +-- + +ALTER TABLE ONLY public.ofrostergroups + ADD CONSTRAINT ofrostergroups_pk PRIMARY KEY (rosterid, rank); + + +-- +-- Name: ofsaslauthorized ofsaslauthorized_pk; Type: CONSTRAINT; Schema: public; Owner: openfire +-- + +ALTER TABLE ONLY public.ofsaslauthorized + ADD CONSTRAINT ofsaslauthorized_pk PRIMARY KEY (username, principal); + + +-- +-- Name: ofsecurityauditlog ofsecurityauditlog_pk; Type: CONSTRAINT; Schema: public; Owner: openfire +-- + +ALTER TABLE ONLY public.ofsecurityauditlog + ADD CONSTRAINT ofsecurityauditlog_pk PRIMARY KEY (msgid); + + +-- +-- Name: ofuser ofuser_pk; Type: CONSTRAINT; Schema: public; Owner: openfire +-- + +ALTER TABLE ONLY public.ofuser + ADD CONSTRAINT ofuser_pk PRIMARY KEY (username); + + +-- +-- Name: ofuserflag ofuserflag_pk; Type: CONSTRAINT; Schema: public; Owner: openfire +-- + +ALTER TABLE ONLY public.ofuserflag + ADD CONSTRAINT ofuserflag_pk PRIMARY KEY (username, name); + + +-- +-- Name: ofuserprop ofuserprop_pk; Type: CONSTRAINT; Schema: public; Owner: openfire +-- + +ALTER TABLE ONLY public.ofuserprop + ADD CONSTRAINT ofuserprop_pk PRIMARY KEY (username, name); + + +-- +-- Name: ofvcard ofvcard_pk; Type: CONSTRAINT; Schema: public; Owner: openfire +-- + +ALTER TABLE ONLY public.ofvcard + ADD CONSTRAINT ofvcard_pk PRIMARY KEY (username); + + +-- +-- Name: ofversion ofversion_pk; Type: CONSTRAINT; Schema: public; Owner: openfire +-- + +ALTER TABLE ONLY public.ofversion + ADD CONSTRAINT ofversion_pk PRIMARY KEY (name); + + +-- +-- Name: ofmucconversationlog_msg_id; Type: INDEX; Schema: public; Owner: openfire +-- + +CREATE INDEX ofmucconversationlog_msg_id ON public.ofmucconversationlog USING btree (messageid); + + +-- +-- Name: ofmucconversationlog_time_idx; Type: INDEX; Schema: public; Owner: openfire +-- + +CREATE INDEX ofmucconversationlog_time_idx ON public.ofmucconversationlog USING btree (logtime); + + +-- +-- Name: ofmucroom_roomid_idx; Type: INDEX; Schema: public; Owner: openfire +-- + +CREATE INDEX ofmucroom_roomid_idx ON public.ofmucroom USING btree (roomid); + + +-- +-- Name: ofmucroom_serviceid_idx; Type: INDEX; Schema: public; Owner: openfire +-- + +CREATE INDEX ofmucroom_serviceid_idx ON public.ofmucroom USING btree (serviceid); + + +-- +-- Name: ofmucservice_serviceid_idx; Type: INDEX; Schema: public; Owner: openfire +-- + +CREATE INDEX ofmucservice_serviceid_idx ON public.ofmucservice USING btree (serviceid); + + +-- +-- Name: ofprivacylist_default_idx; Type: INDEX; Schema: public; Owner: openfire +-- + +CREATE INDEX ofprivacylist_default_idx ON public.ofprivacylist USING btree (username, isdefault); + + +-- +-- Name: ofpubsubnodegroups_idx; Type: INDEX; Schema: public; Owner: openfire +-- + +CREATE INDEX ofpubsubnodegroups_idx ON public.ofpubsubnodegroups USING btree (serviceid, nodeid); + + +-- +-- Name: ofroster_jid_idx; Type: INDEX; Schema: public; Owner: openfire +-- + +CREATE INDEX ofroster_jid_idx ON public.ofroster USING btree (jid); + + +-- +-- Name: ofroster_username_idx; Type: INDEX; Schema: public; Owner: openfire +-- + +CREATE INDEX ofroster_username_idx ON public.ofroster USING btree (username); + + +-- +-- Name: ofrostergroups_rosterid_idx; Type: INDEX; Schema: public; Owner: openfire +-- + +CREATE INDEX ofrostergroups_rosterid_idx ON public.ofrostergroups USING btree (rosterid); + + +-- +-- Name: ofsecurityauditlog_tstamp_idx; Type: INDEX; Schema: public; Owner: openfire +-- + +CREATE INDEX ofsecurityauditlog_tstamp_idx ON public.ofsecurityauditlog USING btree (entrystamp); + + +-- +-- Name: ofsecurityauditlog_uname_idx; Type: INDEX; Schema: public; Owner: openfire +-- + +CREATE INDEX ofsecurityauditlog_uname_idx ON public.ofsecurityauditlog USING btree (username); + + +-- +-- Name: ofuser_cdate_idx; Type: INDEX; Schema: public; Owner: openfire +-- + +CREATE INDEX ofuser_cdate_idx ON public.ofuser USING btree (creationdate); + + +-- +-- Name: ofuserflag_etime_idx; Type: INDEX; Schema: public; Owner: openfire +-- + +CREATE INDEX ofuserflag_etime_idx ON public.ofuserflag USING btree (endtime); + + +-- +-- Name: ofuserflag_stime_idx; Type: INDEX; Schema: public; Owner: openfire +-- + +CREATE INDEX ofuserflag_stime_idx ON public.ofuserflag USING btree (starttime); + + +-- +-- Name: ofrostergroups ofrostergroups_rosterid_fk; Type: FK CONSTRAINT; Schema: public; Owner: openfire +-- + +ALTER TABLE ONLY public.ofrostergroups + ADD CONSTRAINT ofrostergroups_rosterid_fk FOREIGN KEY (rosterid) REFERENCES public.ofroster(rosterid) DEFERRABLE INITIALLY DEFERRED; + + +-- +-- PostgreSQL database dump complete +-- + diff --git a/sql/1/openfire.sql b/sql/federated/1/openfire.sql similarity index 100% rename from sql/1/openfire.sql rename to sql/federated/1/openfire.sql diff --git a/sql/2/openfire.sql b/sql/federated/2/openfire.sql similarity index 100% rename from sql/2/openfire.sql rename to sql/federated/2/openfire.sql diff --git a/start.sh b/start.sh index 89bb1d1..d6a072b 100755 --- a/start.sh +++ b/start.sh @@ -1,7 +1,20 @@ #!/bin/sh -docker-compose down -docker-compose pull + +COMPOSE_FILE=docker-compose-federated.yml + +if [ "$1" = "-c" ]; then + echo "Starting a clustered environment." + COMPOSE_FILE=docker-compose-clustered.yml +else + echo "Starting a federated environment (use -c to start a clustered environment instead)." +fi + +docker-compose -f $COMPOSE_FILE down +docker-compose -f $COMPOSE_FILE pull + +# Clean up temporary persistence data rm -rf _data mkdir _data cp -r xmpp _data/ -docker-compose up \ No newline at end of file + +docker-compose -f $COMPOSE_FILE up \ No newline at end of file diff --git a/xmpp/clustered/1/conf/available-plugins.xml b/xmpp/clustered/1/conf/available-plugins.xml new file mode 100644 index 0000000..2c9650a --- /dev/null +++ b/xmpp/clustered/1/conf/available-plugins.xml @@ -0,0 +1,55 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/xmpp/1/conf/crowd.properties b/xmpp/clustered/1/conf/crowd.properties similarity index 100% rename from xmpp/1/conf/crowd.properties rename to xmpp/clustered/1/conf/crowd.properties diff --git a/xmpp/clustered/1/conf/hazelcast-local-config.xml b/xmpp/clustered/1/conf/hazelcast-local-config.xml new file mode 100644 index 0000000..8747d87 --- /dev/null +++ b/xmpp/clustered/1/conf/hazelcast-local-config.xml @@ -0,0 +1,60 @@ + + + + openfire + openfire + + + 5701 + + 0 + + + + + 224.2.2.3 + 54327 + + + + + + + 10.10.1.* + + + + + + PBEWithMD5AndDES + + thesalt + + thepass + + 19 + + + diff --git a/xmpp/clustered/1/conf/openfire-demoboot.xml b/xmpp/clustered/1/conf/openfire-demoboot.xml new file mode 100644 index 0000000..313425f --- /dev/null +++ b/xmpp/clustered/1/conf/openfire-demoboot.xml @@ -0,0 +1,54 @@ + + + + 9090 + 9091 + + + org.jivesoftware.database.EmbeddedConnectionProvider + + + true + en + + + true + + example.org + example.org + + + embedded + + + admin@example.com + admin + + + + john + secret + John Doe + john.doe@example.com + + + jane@example.org + Jane + + + + + jane + secret + Jane Doe + jane.doe@example.com + + + john@example.org + John + + + + + + diff --git a/xmpp/clustered/1/conf/openfire.xml b/xmpp/clustered/1/conf/openfire.xml new file mode 100644 index 0000000..792d76f --- /dev/null +++ b/xmpp/clustered/1/conf/openfire.xml @@ -0,0 +1,67 @@ + + + + + + + + 9090 + 9091 + + en + + + + + + org.jivesoftware.database.DefaultConnectionProvider + + + + org.postgresql.Driver + jdbc:postgresql://db:5432/openfire + 10d847caed2654fbb1fe6cefac0f381893323ae6b5eea27d31503d5880091fca + 30c1893796e0110fc4607c8b1bca0d0e54f10b270c4615d3 + select 1 + false + false + 500 + 30000 + 900000 + 500 + 5 + 25 + 1.0 + + + true + xmpp1.localhost.example + + true + + diff --git a/xmpp/1/conf/security.xml b/xmpp/clustered/1/conf/security.xml similarity index 100% rename from xmpp/1/conf/security.xml rename to xmpp/clustered/1/conf/security.xml diff --git a/xmpp/1/conf/security/archive/readme.txt b/xmpp/clustered/1/conf/security/archive/readme.txt similarity index 100% rename from xmpp/1/conf/security/archive/readme.txt rename to xmpp/clustered/1/conf/security/archive/readme.txt diff --git a/xmpp/1/conf/security/client.truststore b/xmpp/clustered/1/conf/security/client.truststore similarity index 100% rename from xmpp/1/conf/security/client.truststore rename to xmpp/clustered/1/conf/security/client.truststore diff --git a/xmpp/clustered/1/conf/security/keystore b/xmpp/clustered/1/conf/security/keystore new file mode 100644 index 0000000..8ac6ed6 Binary files /dev/null and b/xmpp/clustered/1/conf/security/keystore differ diff --git a/xmpp/1/conf/security/truststore b/xmpp/clustered/1/conf/security/truststore similarity index 100% rename from xmpp/1/conf/security/truststore rename to xmpp/clustered/1/conf/security/truststore diff --git a/xmpp/1/conf/server-update.xml b/xmpp/clustered/1/conf/server-update.xml similarity index 100% rename from xmpp/1/conf/server-update.xml rename to xmpp/clustered/1/conf/server-update.xml diff --git a/xmpp/clustered/1/plugins/hazelcast.jar b/xmpp/clustered/1/plugins/hazelcast.jar new file mode 100644 index 0000000..dec3c11 Binary files /dev/null and b/xmpp/clustered/1/plugins/hazelcast.jar differ diff --git a/xmpp/clustered/2/conf/available-plugins.xml b/xmpp/clustered/2/conf/available-plugins.xml new file mode 100644 index 0000000..2c9650a --- /dev/null +++ b/xmpp/clustered/2/conf/available-plugins.xml @@ -0,0 +1,55 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/xmpp/2/conf/crowd.properties b/xmpp/clustered/2/conf/crowd.properties similarity index 100% rename from xmpp/2/conf/crowd.properties rename to xmpp/clustered/2/conf/crowd.properties diff --git a/xmpp/clustered/2/conf/hazelcast-local-config.xml b/xmpp/clustered/2/conf/hazelcast-local-config.xml new file mode 100644 index 0000000..8747d87 --- /dev/null +++ b/xmpp/clustered/2/conf/hazelcast-local-config.xml @@ -0,0 +1,60 @@ + + + + openfire + openfire + + + 5701 + + 0 + + + + + 224.2.2.3 + 54327 + + + + + + + 10.10.1.* + + + + + + PBEWithMD5AndDES + + thesalt + + thepass + + 19 + + + diff --git a/xmpp/clustered/2/conf/openfire-demoboot.xml b/xmpp/clustered/2/conf/openfire-demoboot.xml new file mode 100644 index 0000000..313425f --- /dev/null +++ b/xmpp/clustered/2/conf/openfire-demoboot.xml @@ -0,0 +1,54 @@ + + + + 9090 + 9091 + + + org.jivesoftware.database.EmbeddedConnectionProvider + + + true + en + + + true + + example.org + example.org + + + embedded + + + admin@example.com + admin + + + + john + secret + John Doe + john.doe@example.com + + + jane@example.org + Jane + + + + + jane + secret + Jane Doe + jane.doe@example.com + + + john@example.org + John + + + + + + diff --git a/xmpp/clustered/2/conf/openfire.xml b/xmpp/clustered/2/conf/openfire.xml new file mode 100644 index 0000000..0cb579c --- /dev/null +++ b/xmpp/clustered/2/conf/openfire.xml @@ -0,0 +1,67 @@ + + + + + + + + 9090 + 9091 + + en + + + + + + org.jivesoftware.database.DefaultConnectionProvider + + + + org.postgresql.Driver + jdbc:postgresql://db:5432/openfire + 10d847caed2654fbb1fe6cefac0f381893323ae6b5eea27d31503d5880091fca + 30c1893796e0110fc4607c8b1bca0d0e54f10b270c4615d3 + select 1 + false + false + 500 + 30000 + 900000 + 500 + 5 + 25 + 1.0 + + + true + xmpp2.localhost.example + + true + + diff --git a/xmpp/2/conf/security.xml b/xmpp/clustered/2/conf/security.xml similarity index 100% rename from xmpp/2/conf/security.xml rename to xmpp/clustered/2/conf/security.xml diff --git a/xmpp/2/conf/security/archive/readme.txt b/xmpp/clustered/2/conf/security/archive/readme.txt similarity index 100% rename from xmpp/2/conf/security/archive/readme.txt rename to xmpp/clustered/2/conf/security/archive/readme.txt diff --git a/xmpp/2/conf/security/client.truststore b/xmpp/clustered/2/conf/security/client.truststore similarity index 100% rename from xmpp/2/conf/security/client.truststore rename to xmpp/clustered/2/conf/security/client.truststore diff --git a/xmpp/clustered/2/conf/security/keystore b/xmpp/clustered/2/conf/security/keystore new file mode 100644 index 0000000..8ac6ed6 Binary files /dev/null and b/xmpp/clustered/2/conf/security/keystore differ diff --git a/xmpp/2/conf/security/truststore b/xmpp/clustered/2/conf/security/truststore similarity index 100% rename from xmpp/2/conf/security/truststore rename to xmpp/clustered/2/conf/security/truststore diff --git a/xmpp/2/conf/server-update.xml b/xmpp/clustered/2/conf/server-update.xml similarity index 100% rename from xmpp/2/conf/server-update.xml rename to xmpp/clustered/2/conf/server-update.xml diff --git a/xmpp/clustered/2/plugins/hazelcast.jar b/xmpp/clustered/2/plugins/hazelcast.jar new file mode 100644 index 0000000..dec3c11 Binary files /dev/null and b/xmpp/clustered/2/plugins/hazelcast.jar differ diff --git a/xmpp/1/conf/available-plugins.xml b/xmpp/federated/1/conf/available-plugins.xml similarity index 100% rename from xmpp/1/conf/available-plugins.xml rename to xmpp/federated/1/conf/available-plugins.xml diff --git a/xmpp/federated/1/conf/crowd.properties b/xmpp/federated/1/conf/crowd.properties new file mode 100644 index 0000000..d43a8ba --- /dev/null +++ b/xmpp/federated/1/conf/crowd.properties @@ -0,0 +1,42 @@ +# +# This file defines the configuration properties required +# when using the Atlassian Crowd integration for Openfire. +# +# https://confluence.atlassian.com/display/CROWD/The+crowd.properties+file +# +# To activate the Crowd integration for Openfire, you must define +# the following Openfire system properties: +# +# provider.admin.className org.jivesoftware.openfire.crowd.CrowdAdminProvider +# provider.auth.className org.jivesoftware.openfire.crowd.CrowdAuthProvider +# provider.group.className org.jivesoftware.openfire.crowd.CrowdGroupProvider +# provider.user.className org.jivesoftware.openfire.crowd.CrowdUserProvider +# provider.vcard.className org.jivesoftware.openfire.crowd.CrowdVCardProvider +# +# In addition, you may customize the Crowd provider using the following Openfire +# system properties: +# +# admin.authorizedGroups +# crowd.groups.cache.ttl.seconds 3600 +# crowd.users.cache.ttl.seconds 3600 +# + +# The REST URL for your Crowd server. +crowd.server.url=https://YOUR-CROWD-SERVER:8095/crowd/ + +# These properties are required to authenticate with the Crowd server. +# They must match the values specified in the Crowd configuration. +application.name=openfire +application.password= + +# Other optional configuration properties. + +#http.proxy.host= +#http.proxy.port= +#http.proxy.username= +#http.proxy.password= + +# These properties can be used to tune the Crowd integration. +#http.max.connections=20 +#http.timeout=5000 +#http.socket.timeout=20000 diff --git a/xmpp/1/conf/openfire-demoboot.xml b/xmpp/federated/1/conf/openfire-demoboot.xml similarity index 100% rename from xmpp/1/conf/openfire-demoboot.xml rename to xmpp/federated/1/conf/openfire-demoboot.xml diff --git a/xmpp/1/conf/openfire.xml b/xmpp/federated/1/conf/openfire.xml similarity index 100% rename from xmpp/1/conf/openfire.xml rename to xmpp/federated/1/conf/openfire.xml diff --git a/xmpp/federated/1/conf/security.xml b/xmpp/federated/1/conf/security.xml new file mode 100644 index 0000000..4185021 --- /dev/null +++ b/xmpp/federated/1/conf/security.xml @@ -0,0 +1,66 @@ + + + + + + + Blowfish + + + + + + + database.defaultProvider.username + database.defaultProvider.password + + + + diff --git a/xmpp/federated/1/conf/security/archive/readme.txt b/xmpp/federated/1/conf/security/archive/readme.txt new file mode 100644 index 0000000..62573a5 --- /dev/null +++ b/xmpp/federated/1/conf/security/archive/readme.txt @@ -0,0 +1 @@ +This directory is used as a default location in which Openfire stores backups of keystore files. diff --git a/xmpp/federated/1/conf/security/client.truststore b/xmpp/federated/1/conf/security/client.truststore new file mode 100644 index 0000000..c408465 Binary files /dev/null and b/xmpp/federated/1/conf/security/client.truststore differ diff --git a/xmpp/1/conf/security/keystore b/xmpp/federated/1/conf/security/keystore similarity index 100% rename from xmpp/1/conf/security/keystore rename to xmpp/federated/1/conf/security/keystore diff --git a/xmpp/federated/1/conf/security/truststore b/xmpp/federated/1/conf/security/truststore new file mode 100644 index 0000000..cc04a65 Binary files /dev/null and b/xmpp/federated/1/conf/security/truststore differ diff --git a/xmpp/federated/1/conf/server-update.xml b/xmpp/federated/1/conf/server-update.xml new file mode 100644 index 0000000..11d4ace --- /dev/null +++ b/xmpp/federated/1/conf/server-update.xml @@ -0,0 +1,2 @@ + + \ No newline at end of file diff --git a/xmpp/2/conf/available-plugins.xml b/xmpp/federated/2/conf/available-plugins.xml similarity index 100% rename from xmpp/2/conf/available-plugins.xml rename to xmpp/federated/2/conf/available-plugins.xml diff --git a/xmpp/federated/2/conf/crowd.properties b/xmpp/federated/2/conf/crowd.properties new file mode 100644 index 0000000..d43a8ba --- /dev/null +++ b/xmpp/federated/2/conf/crowd.properties @@ -0,0 +1,42 @@ +# +# This file defines the configuration properties required +# when using the Atlassian Crowd integration for Openfire. +# +# https://confluence.atlassian.com/display/CROWD/The+crowd.properties+file +# +# To activate the Crowd integration for Openfire, you must define +# the following Openfire system properties: +# +# provider.admin.className org.jivesoftware.openfire.crowd.CrowdAdminProvider +# provider.auth.className org.jivesoftware.openfire.crowd.CrowdAuthProvider +# provider.group.className org.jivesoftware.openfire.crowd.CrowdGroupProvider +# provider.user.className org.jivesoftware.openfire.crowd.CrowdUserProvider +# provider.vcard.className org.jivesoftware.openfire.crowd.CrowdVCardProvider +# +# In addition, you may customize the Crowd provider using the following Openfire +# system properties: +# +# admin.authorizedGroups +# crowd.groups.cache.ttl.seconds 3600 +# crowd.users.cache.ttl.seconds 3600 +# + +# The REST URL for your Crowd server. +crowd.server.url=https://YOUR-CROWD-SERVER:8095/crowd/ + +# These properties are required to authenticate with the Crowd server. +# They must match the values specified in the Crowd configuration. +application.name=openfire +application.password= + +# Other optional configuration properties. + +#http.proxy.host= +#http.proxy.port= +#http.proxy.username= +#http.proxy.password= + +# These properties can be used to tune the Crowd integration. +#http.max.connections=20 +#http.timeout=5000 +#http.socket.timeout=20000 diff --git a/xmpp/2/conf/openfire-demoboot.xml b/xmpp/federated/2/conf/openfire-demoboot.xml similarity index 100% rename from xmpp/2/conf/openfire-demoboot.xml rename to xmpp/federated/2/conf/openfire-demoboot.xml diff --git a/xmpp/2/conf/openfire.xml b/xmpp/federated/2/conf/openfire.xml similarity index 100% rename from xmpp/2/conf/openfire.xml rename to xmpp/federated/2/conf/openfire.xml diff --git a/xmpp/federated/2/conf/security.xml b/xmpp/federated/2/conf/security.xml new file mode 100644 index 0000000..4185021 --- /dev/null +++ b/xmpp/federated/2/conf/security.xml @@ -0,0 +1,66 @@ + + + + + + + Blowfish + + + + + + + database.defaultProvider.username + database.defaultProvider.password + + + + diff --git a/xmpp/federated/2/conf/security/archive/readme.txt b/xmpp/federated/2/conf/security/archive/readme.txt new file mode 100644 index 0000000..62573a5 --- /dev/null +++ b/xmpp/federated/2/conf/security/archive/readme.txt @@ -0,0 +1 @@ +This directory is used as a default location in which Openfire stores backups of keystore files. diff --git a/xmpp/federated/2/conf/security/client.truststore b/xmpp/federated/2/conf/security/client.truststore new file mode 100644 index 0000000..c408465 Binary files /dev/null and b/xmpp/federated/2/conf/security/client.truststore differ diff --git a/xmpp/2/conf/security/keystore b/xmpp/federated/2/conf/security/keystore similarity index 100% rename from xmpp/2/conf/security/keystore rename to xmpp/federated/2/conf/security/keystore diff --git a/xmpp/federated/2/conf/security/truststore b/xmpp/federated/2/conf/security/truststore new file mode 100644 index 0000000..cc04a65 Binary files /dev/null and b/xmpp/federated/2/conf/security/truststore differ diff --git a/xmpp/federated/2/conf/server-update.xml b/xmpp/federated/2/conf/server-update.xml new file mode 100644 index 0000000..11d4ace --- /dev/null +++ b/xmpp/federated/2/conf/server-update.xml @@ -0,0 +1,2 @@ + + \ No newline at end of file