diff --git a/README.md b/README.md index c2f451f..5692fcd 100644 --- a/README.md +++ b/README.md @@ -20,13 +20,15 @@ The project is organized as a number of sub-projects, with the important ones to * The *common* library ([platform/common](./common)), contains common interfaces shared across platform modules. -* The *kernel* library ([platform/kernel](./kernel)), contains the boot-strapping functionality. It's responsible for starting system services and introducing them to each other. +* The *kernel* library ([platform/kernel](./kernel)), contains the boot-strapping functionality. It's responsible for + starting system services and introducing them to each other. * The *host* library ([platform/host](./host)), contains the manager for hosted applications. * The *platformDB* library ([platform/platformDB](./platformDB)), contains the platform database. -* The *platformUI* library ([platform/platformUI](./platformUI)), contains the end-points for the platform web-application. +* The *platformUI* library ([platform/platformUI](./platformUI)), contains the end-points for the platform + web-application. ## Installation @@ -35,113 +37,8 @@ The project is organized as a number of sub-projects, with the important ones to ## Steps to test the PAAS functionality: -Note that steps 2 and 3 are temporary, and step 3 needs to be re-executed every time after an OS reboot. - -1. Create "xqiz.it" subdirectory under the user home directory for the platform persistent data. The subdirectory "platform" will be used to keep the platform operational information and subdirectory "users" for hosted applications. - -2. Create a file "~/xqiz.it/port-forwarding.conf" with the following content: - - rdr pass on lo0 inet proto tcp from any to self port 80 -> 127.0.0.1 port 8080 - rdr pass on lo0 inet proto tcp from any to self port 443 -> 127.0.0.1 port 8090 - -3. Run the following command to redirect http and https traffic to unprivileged ports: - - sudo pfctl -evf ~/xqiz.it/platform/port-forwarding.conf - -4. Make sure you can ping the local platform address: - -gradle@linuxkit-1a9fc18e4ccc:~/platform$ more README.md -# Platform as a Service # - -This is the public repository for the prototype of the PAAS project. - -## What is PAAS? - -TODO - -## Status: - -This project is currently in the "proof of concept" mode. - -## License - -TODO - -## Layout - -The project is organized as a number of sub-projects, with the important ones to know about being: - -* The *common* library ([platform/common](./common)), contains common interfaces shared across platform modules. - -* The *kernel* library ([platform/kernel](./kernel)), contains the boot-strapping functionality. It's responsible for starting system services and introducing them to each other. - -* The *host* library ([platform/host](./host)), contains the manager for hosted applications. - -* The *platformDB* library ([platform/platformDB](./platformDB)), contains the platform database. - -* The *platformUI* library ([platform/platformUI](./platformUI)), contains the end-points for the platform web-application. - -## Installation - -1. Please follow steps 1-3 of the [XDK Installation](https://github.com/xtclang/xvm#installation). -2. Clone [the platform repository](https://github.com/xtclang/platform) to your local machine. - -## Steps to test the PAAS functionality: - -Note that steps 2 and 3 are temporary, and step 3 needs to be re-executed every time after an OS reboot. - -1. Create "xqiz.it" subdirectory under the user home directory for the platform persistent data. The subdirectory "platform" will be used to keep the platform operational information and subdirectory "users" for hosted applications. - -2. Create a file "~/xqiz.it/port-forwarding.conf" with the following content: - - rdr pass on lo0 inet proto tcp from any to self port 80 -> 127.0.0.1 port 8080 - rdr pass on lo0 inet proto tcp from any to self port 443 -> 127.0.0.1 port 8090 - -3. Run the following command to redirect http and https traffic to unprivileged ports: - - sudo pfctl -evf ~/xqiz.it/platform/port-forwarding.conf - -4. Make sure you can ping the local platform address: - -gradle@linuxkit-1a9fc18e4ccc:~/platform$ more README.md -# Platform as a Service # - -This is the public repository for the prototype of the PAAS project. - -## What is PAAS? - -TODO - -## Status: - -This project is currently in the "proof of concept" mode. - -## License - -TODO - -## Layout - -The project is organized as a number of sub-projects, with the important ones to know about being: - -* The *common* library ([platform/common](./common)), contains common interfaces shared across platform modules. - -* The *kernel* library ([platform/kernel](./kernel)), contains the boot-strapping functionality. It's responsible for starting system services and introducing them to each other. - -* The *host* library ([platform/host](./host)), contains the manager for hosted applications. - -* The *platformDB* library ([platform/platformDB](./platformDB)), contains the platform database. - -* The *platformUI* library ([platform/platformUI](./platformUI)), contains the end-points for the platform web-application. - -## Installation - -1. Please follow steps 1-3 of the [XDK Installation](https://github.com/xtclang/xvm#installation). -2. Clone [the platform repository](https://github.com/xtclang/platform) to your local machine. - -## Steps to test the PAAS functionality: - -Note that steps 2 and 3 are temporary, and step 3 needs to be re-executed every time after an OS reboot. +Note that steps 1 and 2 are temporary, and step 2 needs to be re-executed every time after an OS reboot. Steps 3-8 need +to be done just once. 1. Create "xqiz.it" subdirectory under the user home directory for the platform persistent data. The subdirectory "platform" will be used to keep the platform operational information and subdirectory "users" for hosted applications. @@ -163,38 +60,58 @@ Note that steps 2 and 3 are temporary, and step 3 needs to be re-executed every 5. Create a self-signed certificate for the platform web server. For example: - keytool -genkeypair -alias platform -keyalg RSA -keysize 2048 -validity 365 -dname "OU=Platform, O=[your name], C=US" -keystore ~/xqiz.it/platform/keystore.p12 -storetype PKCS12 -storepass [password] + keytool -genkeypair -alias platform -keyalg RSA -keysize 2048 -validity 365 -dname "OU=Platform, O=[your name], C=US" -keystore ~/xqiz.it/platform/certs.p12 -storetype PKCS12 -storepass [password] 6. Add a symmetric key to encode the cookies: - keytool -genseckey -alias cookies -keyalg AES -keysize 256 -keystore ~/xqiz.it/platform/keystore.p12 -storetype PKCS12 -storepass [password] + keytool -genseckey -alias cookies -keyalg AES -keysize 256 -keystore ~/xqiz.it/platform/certs.p12 -storetype PKCS12 -storepass [password] + +7. If you want to run with an XDK installation and not just let the plugin sort it out, make sure you + have [xdk-latest](https://github.com/xtclang/xvm#readme) installed. + +8. Make sure you have an updated Java runtime installed. It should really be enough with any old Java, so that +you can run the Gradle wrapper. The Java toolchains support should theoretically download the latest compatible +Java environment for you, but we haven't fully tested this outside the XTC plugin branch). -7. Make sure you have the latest [gradle](https://gradle.org/), [node](https://nodejs.org/en), [yarn](https://yarnpkg.com/) and [xdk-latest](https://github.com/xtclang/xvm#readme) installed. If you are using `brew`, you can simply say: +8. There should no longer be a need for you to have Node, NPM or Yarn installed. The Gradle Node plugin + should take care of downloading its required dependencies without needing additional configuration. The + platform may use Quasar for its dev environment. Set the property: - brew install gradle node yarn + org.lang.platform.quasarGlobal=[true|false] -8. Make sure all necessary *node* modules are installed using the following command from the ([platform/platformUI/gui](./platformUI/gui)) directory: + to "true" if you want to install Quasar as a global artifact, for your system wide Node + platform (the default is "false"). The Node application suite is local to the Gradle build, + and absolutely nothing will be installed anywhere on your system from invoking the Node suite. + The artifacts will, however, be cached, just like other Gradle dependencies, so that they can + quickly be invoked again on incremental rebuilds of the project. - npm install +9. Build the platform services using the Gradle command (from the "platform" directory, i.e. the repository root): + To get more information on the build, you can use the --info, --stacktrace or --scan flags. -9. If you plan to use `quasar` dev environment, please intall it globally by the following command: + ./gradlew build - npm install -g @quasar/cli +10. Start the platform using the command (from within the project root directory directory): -10. Build the platform services using the gradle command (from within the "platform" directory): + ./gradlew run -Porg.xtclang.platform.password=[password] - gradle build + You can also store the password as a Gradle property, and just do "./gradlew run". As it's a secret + property, the standard location would be $GRADLE_USER_HOME/gradle.properties. And if you want, you + can also use the XTC native launcher that came with your locally installed XDK distribution. The repo + should run just fine with Gradle and the XTC plugin still, though. -11. Start the platform using the command (from within the "platform" directory): + xec -L + kernel [password] - xec -L lib/ lib/kernel.xtc [password] +11. Open the hosting site in a browser: -12. Open the hosting site in a browser: + https://xtc-platform.xqiz.it:8090/ - https://xtc-platform.localhost.xqiz.it +12. Follow the instructions from the [Examples](https://github.com/xtclang/examples) repository to build and "upload" a + web application. -13. Follow the instructions from the [Examples](https://github.com/xtclang/examples) repository to build and "upload" a web application. 14. Log into the "Ecstasy Cloud" platform using "admin@acme.om/password" credentials. + 15. Go to the "Modules" panel and install any of the example module (e.g. "welcome.examples.org"). + 16. Go to the "Application" panel, register a deployment (e.g. "welcome") and "start" it + 17. Click on the URL to launch your application web page.