Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • 10:48

    albogdano on snyk-upgrade-ba2eeac3d61fb17ca7bcfe0078e67072

    (compare)

  • 10:48
    albogdano closed #167
  • 05:46
    snyk-bot opened #167
  • 05:46

    albogdano on snyk-upgrade-ba2eeac3d61fb17ca7bcfe0078e67072

    fix: upgrade ch.qos.logback:log… (compare)

  • 05:46

    albogdano on snyk-upgrade-ba2eeac3d61fb17ca7bcfe0078e67072

    (compare)

  • Sep 27 23:51
    albogdano opened #166
  • Sep 27 23:51

    albogdano on snyk-upgrade-d5c9be2ee66b5ac7a3cebefe51909cb2

    (compare)

  • Sep 27 23:51

    albogdano on snyk-upgrade-d5c9be2ee66b5ac7a3cebefe51909cb2

    fix: upgrade org.glassfish.jers… (compare)

  • Sep 26 22:57

    albogdano on master

    updated dependencies (compare)

  • Sep 26 21:05
    nachoverdon starred Erudika/para
  • Sep 25 06:13
    anilprasad starred Erudika/para
  • Sep 23 23:14
    albogdano opened #165
  • Sep 23 23:14

    albogdano on snyk-upgrade-33d704c82a31a38ea9d3223290aeea9e

    (compare)

  • Sep 23 23:14

    albogdano on snyk-upgrade-33d704c82a31a38ea9d3223290aeea9e

    fix: upgrade com.unboundid:unbo… (compare)

  • Sep 23 06:05
    albogdano opened #164
  • Sep 23 06:05

    albogdano on snyk-upgrade-ad66dca741fb1a4d122ee777b5849c14

    fix: upgrade io.github.hakky54:… (compare)

  • Sep 23 06:05

    albogdano on snyk-upgrade-ad66dca741fb1a4d122ee777b5849c14

    (compare)

  • Sep 22 15:23

    albogdano on snyk-upgrade-9c4493cb2e2e59d4149ce31e239ff877

    (compare)

  • Sep 22 15:23
    albogdano closed #163
  • Sep 22 15:23

    albogdano on master

    updated dependencies (compare)

Ghost
@ghost~611eae376da03739848387d6
Is there any separate documentation or the Javadocs for all these details? I don't see it in the docs or am I looking at the wrong place?
Alex Bogdanovski
@albogdano
yes, the docs and Javadocs are here http://paraio.org/docs/#003-maven
Ghost
@ghost~611eae376da03739848387d6
Thank you @albogdano will take a look and get back to you if there are any questions. Thanks for the quick response!
Alex Bogdanovski
@albogdano
you are welcome!
rakurakupg
@rakurakupg

Hello! I try to run para-jar with MySQL with following configuration but It looks to run with H2DB.

para.env = "development"
para.sql.driver = "com.mysql.jdbc.Driver"
para.sql.url = "mysql://127.0.0.1:3306/para_qa"
para.sql.user = "test"
para.sql.password = "test"
para.dao = "SqlDAO"

This is mvn command to run para-jar.

./mvnw -Dconfig.file=../application.conf spring-boot:run

And following console log is displayed.

[INFO] Attaching agents: []

    ____  ___ _ ____ ___ _ 
    / __ \/ __` / ___/ __` /
    / /_/ / /_/ / /  / /_/ / 
/ .___/\__,_/_/   \__,_/  v1.40.0
/_/                        

2021-09-05 14:20:45 [INFO ] --- Para.initialize() [production] ---
2021-09-05 14:20:45 [INFO ] Loaded new DAO, Search and Cache implementations - H2DAO, LuceneSearch and CaffeineCache.
2021-09-05 14:20:46 [WARN ] Server is unhealthy - root app not found. Open http://localhost:8080/v1/_setup in the browser to initialize Para.

Is there anything what I have to configure to run para with MySQL ?

Alex Bogdanovski
@albogdano
@rakurakupg try creating a table called para with URL of mysql://127.0.0.1:3306/para
@rakurakupg also in the log it says that SqlDAO is not actually loaded and Para starts with the default H2DAO. Make sure the configuration is loaded by specifying the full path to the application.conf file
rakurakupg
@rakurakupg

@albogdano, Thank you for advice , but it's not work for me.

I wonder why I get log message Para.initialize() [production] even though I set para.env=development in config file.
I try another command like below.

./mvnw -Pbase clean package spring-boot:repackage && java -Dconfig.file=/Users/.../para/application.conf -jar target/para-1.40.0.jar 

Then I got following log.

[INFO] ------------------------------------------------------------------------

    ____  ___ _ ____ ___ _ 
    / __ \/ __` / ___/ __` /
    / /_/ / /_/ / /  / /_/ / 
/ .___/\__,_/_/   \__,_/  v1.40.0
/_/                        

2021-09-05 20:59:56 [INFO ] --- Para.initialize() [development] ---
2021-09-05 20:59:56 [INFO ] Loaded new DAO, Search and Cache implementations - MockDAO, MockSearch and CaffeineCache.
2021-09-05 20:59:57 [WARN ] Server is unhealthy - root app not found. Open http://localhost:8080/v1/_setup in the browser to initialize Para.

It seems para-jar is loading correct application.conf but It looks loading MockDAO instead of MySQL .
I checked mysql schema but I can't find any tables generated by application.

I tested both absolute path and relative path for -Dconfig.file parameter but nothing has changed.
In any case do we get MockDAO in console log ?

Alex Bogdanovski
@albogdano
@rakurakupg the correct command is ./mvnw clean package && java -jar -Dconfig.file=/Users/.../para/application.conf target/para-1.40.0.jar
rakurakupg
@rakurakupg
It can work with command in your last post . Thank you ~
Lemon
@liuguangmao
How can I manage the data
Alex Bogdanovski
@albogdano
Lemon
@liuguangmao
Ok thanks
Alex Bogdanovski
@albogdano
there's also npm i -g para-cli
Lemon
@liuguangmao
OK I'll try
Thank u
Alex Bogdanovski
@albogdano
you're welcome!
Rob Bell
@admin82_gitlab
Hi all—just wondering if anyone's had any experience of running Para in Kubernetes?
Alex Bogdanovski
@albogdano
@admin82_gitlab Hi Rob! I don't have much experience with K8 but there's a Helm chart you could use to get started - https://github.com/Erudika/scoold/tree/master/helm
Rob Bell
@admin82_gitlab
Hi @albogdano—is this chart just for the Scoold side of things? I have this up and running on my cluster and I'm currently connecting to a free tier of the Para managed service
I'm looking to get Para itself up and running on K8s so I don't need to reach out to the managed version
Alex Bogdanovski
@albogdano
Yes, the Helm chart is just for Scoold
I might add Para as another pod in the chart soon
Rob Bell
@admin82_gitlab
that would really help us out
Alex Bogdanovski
@albogdano
Both applications are very similar and based on Spring Boot. Perhaps you could just copy the Helm chart and update the container image to load erudikaltd/para:latest_stable instead of Scoold
Rob Bell
@admin82_gitlab
I was just thinking the same thing. I don't know much about Para and what other config and connection setup would be required if I were to roll them into a single chart, but I'll have a go at running Para on its own first
Rob Bell
@admin82_gitlab
Any pointers on how to get connection details for the para instance once it's deployed?
Alex Bogdanovski
@albogdano
@admin82_gitlab Para is deployed on port 8080 by default. the hostname is localhost.
I you use the histed service, the hostname is https://paraio.com
Rob Bell
@admin82_gitlab
I'm using an instance deployed to my cluster, but how do I get the key and secret once it's up and running? Do I need to manually create a database too?
Alex Bogdanovski
@albogdano
Rob Bell
@admin82_gitlab
So my pod should be provisioned with a Para container with a /para/data folder and an empty application.conf in /para?
then I'll need to exec into the pod to grab the written application.conf
Rob Bell
@admin82_gitlab
is there a method that would allow me to spin up both pods and have Scoold configured with the keys/secrets to communicate with Para?
Alex Bogdanovski
@albogdano
@admin82_gitlab well this is already possible with docker compose but I don't know how it can be achieved in K8
A completely automatic Helm chart for both Para and Scoold would be nice - i.e. one where both Para and Scoold get autoconfigured on first boot
But this is still something I haven't done yet
Rob Bell
@admin82_gitlab
Thanks—the docker-compose.yml is a useful starting point. If I can figure it out I'll make sure to share it
Alex Bogdanovski
@albogdano
:thumbsup:
Rob Bell
@admin82_gitlab

I'm having a little trouble passing configuration to the Para instance rather than letting it set its own configuration after setup—judging by the docs this sounds possible. I'd also like to avoid any imperative calls to create Para apps and configure these via passed config if possible. I'm not sure if either are achievable, but essentially the order of events in my Helm chart would be:

1) Define a k8s Secret object containing the Scoold app name, and a chosen access key and secret key
2) Pass the Secret to both the the Scoold and Para deployment/pods and have Para set this as the access key and secret rather than have it generate its own
3) Optionally run a pre-init container to create the Scoold app on the Para instance
4) Run both pods with the passed in Secret config for the access key/secret and app name

Is this possible or am I missing a simpler approach? The documentation for Para is a little sparse.

Alex Bogdanovski
@albogdano
@admin82_gitlab all secret keys for Para apps are auto-generated by Para. 1, 2, 4 are not possible. Para and Scoold have recently implemented auto-init functionality where each service will auto-initialize itself if the configuration file is missing. I'm not sure how config files are handled in K8 but passing preconfigured secrets is definitely not possible. You can always edit the database object and change the secret key but that can only be done manually. You can start Para, create the Scoold app and then pass that secret to the Scoold pod. In all cases, you will need to create a separate app for Scoold.
Rob Bell
@admin82_gitlab
The auto-init functionality should only refresh the application.conf and write a new root_access_key and root_secret_key if they're missing—is that correct? That's not what I've observed when spinning up a Para instance in Docker and mounting a volume with a populated application.conf
Config and Secret objects in K8s are readonly, so can be passed into pods but not re-written. The approach in K8s might be to provision Para as a StatefulSet as opposed to a Service, provide it a readwritemany PersistentVolumeClaim which the StatefulSet and the Scoold Deployment can mount and allow for writing and reading of credentials. I'm not sure this is a very safe method for sharing those though.
Rob Bell
@admin82_gitlab
Is it possible to use Azure AD for the auth from Scoold to Para, or is that only possible for authenticating users directly against Para?
Alex Bogdanovski
@albogdano
@admin82_gitlab ignore para.root_access_key and para.root_secret_key for now - they are just saved there for convenience when you need to use them. The secret key is never read by Para from the config file. Para generates a new secret each time an app is created and that secret is saved to the database.
The steps to initialize Scoold are:
  1. Initialize Para - create root app and secret
  2. Use the root app's secret to create new app for Scoold (either via API or Para CLI)
  3. Start Scoold with the keys generated in step 2
Azure AD/OIDC is supported and can be used as an identity provider.
Rob Bell
@admin82_gitlab
Thanks for the reply - I don't think the initialisation steps above will lend themselves well to a single Helm chart. Regarding Azure AD, can I use it both to allow users to log in to the Scoold app, and the Scoold app (via a Managed Identity or similar)
Alex Bogdanovski
@albogdano
@admin82_gitlab Azure AD can be used as the only identity provider in Scoold and you can disable password auth altogether. All profile data will be pulled from Azure then.
Rob Bell
@admin82_gitlab
And Scoold would authenticate with Para as the given Azure AD user, or there needs to be some other configuration of communication between Scoold and Para? Apologies, I'm a bit confused here
Alex Bogdanovski
@albogdano
@admin82_gitlab Scoold sends users to Azure for authentication, then Azure returns the request to Para where it is handled and finally Para redirects back to Scoold. Each Para app can have its own individual OAuth2 settings. Para handles all authentication requests.