Skip to content

Commit

Permalink
general development.*
Browse files Browse the repository at this point in the history
  • Loading branch information
anatolicvs committed Apr 20, 2020
1 parent 56e2fa6 commit 28b011d
Show file tree
Hide file tree
Showing 9 changed files with 804 additions and 312 deletions.
Binary file modified .metals/metals.h2.db
Binary file not shown.
31 changes: 31 additions & 0 deletions .metals/metals.log
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,34 @@ INFO: Unsupported notification method: $/setTraceNotification
Apr 16, 2020 7:23:04 PM org.eclipse.lsp4j.jsonrpc.services.GenericEndpoint notify
INFO: Unsupported notification method: $/setTraceNotification
INFO shutting down Metals
INFO started: Metals version 0.8.4 in workspace '/home/magnusanatolius/works/in-sylva.infrastructure'
INFO time: initialize in 0.48s
WARN no build tool detected in workspace '/home/magnusanatolius/works/in-sylva.infrastructure'. The most common cause for this problem is that the editor was opened in the wrong working directory, for example if you use sbt then the workspace directory should contain build.sbt.
INFO started: Metals version 0.8.4 in workspace '/home/magnusanatolius/works/in-sylva.infrastructure'
INFO time: initialize in 0.48s
WARN no build tool detected in workspace '/home/magnusanatolius/works/in-sylva.infrastructure'. The most common cause for this problem is that the editor was opened in the wrong working directory, for example if you use sbt then the workspace directory should contain build.sbt.
Apr 19, 2020 6:33:30 PM org.eclipse.lsp4j.jsonrpc.services.GenericEndpoint notify
INFO: Unsupported notification method: $/setTraceNotification
Apr 19, 2020 6:37:30 PM org.eclipse.lsp4j.jsonrpc.services.GenericEndpoint notify
INFO: Unsupported notification method: $/setTraceNotification
Apr 19, 2020 6:38:31 PM org.eclipse.lsp4j.jsonrpc.services.GenericEndpoint notify
INFO: Unsupported notification method: $/setTraceNotification
Apr 19, 2020 6:38:33 PM org.eclipse.lsp4j.jsonrpc.services.GenericEndpoint notify
INFO: Unsupported notification method: $/setTraceNotification
Apr 19, 2020 6:38:43 PM org.eclipse.lsp4j.jsonrpc.services.GenericEndpoint notify
INFO: Unsupported notification method: $/setTraceNotification
Apr 19, 2020 6:38:46 PM org.eclipse.lsp4j.jsonrpc.services.GenericEndpoint notify
INFO: Unsupported notification method: $/setTraceNotification
Apr 19, 2020 6:41:06 PM org.eclipse.lsp4j.jsonrpc.services.GenericEndpoint notify
INFO: Unsupported notification method: $/setTraceNotification
Apr 19, 2020 6:41:08 PM org.eclipse.lsp4j.jsonrpc.services.GenericEndpoint notify
INFO: Unsupported notification method: $/setTraceNotification
Apr 19, 2020 6:43:20 PM org.eclipse.lsp4j.jsonrpc.services.GenericEndpoint notify
INFO: Unsupported notification method: $/setTraceNotification
Apr 19, 2020 6:43:58 PM org.eclipse.lsp4j.jsonrpc.services.GenericEndpoint notify
INFO: Unsupported notification method: $/setTraceNotification
Apr 19, 2020 6:44:21 PM org.eclipse.lsp4j.jsonrpc.services.GenericEndpoint notify
INFO: Unsupported notification method: $/setTraceNotification
Apr 19, 2020 6:44:45 PM org.eclipse.lsp4j.jsonrpc.services.GenericEndpoint notify
INFO: Unsupported notification method: $/setTraceNotification
INFO shutting down Metals
12 changes: 11 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -197,4 +197,14 @@ For more complete information on a certificate:

### NOSPC: no space left on device' while running the nodeJS in docker

`sudo docker system prune -af`
`sudo docker system prune -af`


# Using the Admin CLI of Keycloak

```sh
$ $JBOSS_HOME/bin/kcadm.sh config credentials --server http://localhost:8080/keycloak/auth --realm master --user insylva_admin --password v2kGBDUaGjXK2VuPyf5R64VS
$ kcadm.sh create realms -s realm=in-sylva-2 -s enabled=true -o
$ CID=$(kcadm.sh create clients -r in-sylva-2 -s clientId=my_client -s 'redirectUris=["*"]' -i)
$ kcadm.sh get clients/$CID/installation/providers/keycloak-oidc-keycloak-json
```
96 changes: 75 additions & 21 deletions build.sh
Original file line number Diff line number Diff line change
@@ -1,27 +1,81 @@
#!/bin/bash


# echo -n "Enter the name of public key (ex:id_ed25519): "
# read publickey

if [$1 -eq ""]
then
set "id_ed25519"
set $"id_ed25519"
fi

echo $publickey
echo -n "Enter the name of docker image name which is wanted to build locally: (ex:gatekeeper or || all): "
read imageName

if [$imageName -eq ""]
then
set $"all"
fi

sh ./gatekeeper/build.sh $1
wait
echo "gatekeeper image Successfully built"
sh ./keycloak/build.sh $1
wait
echo "keycloak image Successfully built"
sh ./login/build.sh $1
wait
echo "login image Successfully built"
sh ./portal/build.sh $1
wait
echo "portal image Successfully built"
sh ./postgresql/build.sh $1
wait
echo "postgresql image Successfully built"
sh ./source.manager/build.sh $1
echo "source.manager image Successfully built"
wait
sh ./doc/build.sh $1
echo "doc image Successfully built"
case $imageName in
"gatekeeper")
sh ./gatekeeper/build.sh $1
wait
echo -e $"gatekeeper image Successfully built\n"
;;
"keycloak")
sh ./keycloak/build.sh $1
wait
echo -e $"keycloak image Successfully built\n"
;;
"login")
sh ./login/build.sh $1
wait
echo -e $"login image Successfully built\n"
;;
"portal")
sh ./portal/build.sh $1
wait
echo -e $"portal image Successfully built\n"
;;
"postgresql")
sh ./postgresql/build.sh $1
wait
echo -e $"postgresql image Successfully built\n"
;;
"sourceman")
sh ./source.manager/build.sh $1
wait
echo -e $"source.manager image Successfully built\n"
;;
"doc")
sh ./doc/build.sh $1
wait
echo $"doc image Successfully built\n"
;;
*)
sh ./gatekeeper/build.sh $1
wait
echo -e $"gatekeeper image Successfully built\n"
sh ./keycloak/build.sh $1
wait
echo -e $"keycloak image Successfully built\n"
sh ./login/build.sh $1
wait
echo -e $"login image Successfully built\n"
sh ./portal/build.sh $1
wait
echo -e $"portal image Successfully built\n"
sh ./postgresql/build.sh $1
wait
echo -e $"postgresql image Successfully built\n"
sh ./source.manager/build.sh $1
wait
echo -e $"source.manager image Successfully built\n"
sh ./doc/build.sh $1
wait
echo $"doc image Successfully built\n"
;;
esac
shift
21 changes: 17 additions & 4 deletions data.sql
Original file line number Diff line number Diff line change
Expand Up @@ -13,16 +13,29 @@ CREATE TABLE IF NOT EXISTS users (

CREATE TABLE IF NOT EXISTS sources (
id serial PRIMARY KEY,
index_id varchar(50),
mng_id varchar(50) NOT NULL,
name varchar(50) NOT NULL ,
description text,

is_send boolean default false,

create_at timestamp NOT NULL DEFAULT NOW(),
update_at timestamp
);

CREATE TABLE IF NOT EXISTS sources_indices(
id serial PRIMARY KEY,
source_id integer,

index_id varchar(50),
mng_id varchar(50) NOT NULL,
is_send boolean default false,

CONSTRAINT sources_indices_source_id_fkey FOREIGN KEY (source_id)
REFERENCES sources(id) MATCH SIMPLE
ON UPDATE NO ACTION ON DELETE NO ACTION,

create_at timestamp NOT NULL DEFAULT NOW(),
update_at timestamp
);

CREATE table IF NOT EXISTS provider_sources (
id serial PRIMARY KEY,
user_id integer NOT NULL,
Expand Down
3 changes: 2 additions & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ services:
DB_PASSWORD: v2kGBDUaGjXK2VuPyf5R64VS
KEYCLOAK_USER: insylva_admin
KEYCLOAK_PASSWORD: v2kGBDUaGjXK2VuPyf5R64VS
KEYCLOAK_IMPORT: /home/realms/realm-export.json
# Uncomment the line below if you want to specify JDBC parameters. The parameter below is just an example, and it shouldn't be used in production without knowledge. It is highly recommended that you read the PostgreSQL JDBC driver documentation in order to use it.
#JDBC_PARAMS: "ssl=true"
ports:
Expand All @@ -41,7 +42,7 @@ services:
restart: unless-stopped

pgadmin:
image: dpage/pgadmin4
image: dpage/pgadmin4:latest
deploy:
resources:
limits:
Expand Down
4 changes: 4 additions & 0 deletions generate-initial-values-keycloak.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/bin/bash

docker exec -it in-sylva.keycloak /bin/bash -c "/opt/jboss/keycloak/bin/kcadm.sh config credentials --server http://localhost:8080/keycloak/auth --realm master --user insylva_admin --password v2kGBDUaGjXK2VuPyf5R64VS"
docker exec -it in-sylva.keycloak /bin/bash -c "/opt/jboss/keycloak/bin/kcadm.sh create realms -f /home/realms/realm-export.json
12 changes: 9 additions & 3 deletions keycloak/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
FROM centos:latest

ENV KEYCLOAK_VERSION 9.0.0
ENV KEYCLOAK_VERSION 9.0.3
ENV JDBC_POSTGRES_VERSION 42.2.5
ENV JDBC_MYSQL_VERSION 5.1.46
ENV JDBC_MARIADB_VERSION 2.2.3
ENV JDBC_MSSQL_VERSION 7.4.1.jre11

ENV LAUNCH_JBOSS_IN_BACKGROUND 1
ENV PROXY_ADDRESS_FORWARDING true
ENV JBOSS_HOME /opt/jboss/keycloak
Expand All @@ -19,9 +18,14 @@ USER root

RUN yum update -y && yum install -y gzip hostname java-11-openjdk-headless openssl tar which && yum clean all


RUN mkdir /home/realms
COPY realm-export.json /home/realms

ADD tools /opt/jboss/tools
RUN /opt/jboss/tools/build-keycloak.sh


RUN sed -i -e 's/<web-context>auth<\/web-context>/<web-context>keycloak\/auth<\/web-context>/' $JBOSS_HOME/standalone/configuration/standalone.xml
RUN sed -i -e 's/<web-context>auth<\/web-context>/<web-context>keycloak\/auth<\/web-context>/' $JBOSS_HOME/standalone/configuration/standalone-ha.xml
RUN sed -i -e 's/name="\/"/name="\/keycloak\/"/' $JBOSS_HOME/standalone/configuration/standalone.xml
Expand All @@ -33,4 +37,6 @@ EXPOSE 8443

ENTRYPOINT [ "/opt/jboss/tools/docker-entrypoint.sh" ]

CMD ["-b", "0.0.0.0"]
CMD ["-b", "0.0.0.0"]

# RUN $JBOSS_HOME/bin/kcadm.sh config credentials --server http://localhost:8080/keycloak/auth --realm master --user $KEYCLOAK_USER --password $KEYCLOAK_PASSWORD
Loading

0 comments on commit 28b011d

Please sign in to comment.