Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

3.server

27 views

Published on

Waltz (ex. TangoWebapp) workshop @SOLARIS. Server

Published in: Software
  • Be the first to comment

  • Be the first to like this

3.server

  1. 1. mTangoREST.servermTangoREST.server
  2. 2. ingvord/mtangorest.serveringvord/mtangorest.server
  3. 3. 4.07.18 Igor Khokhriakov & Olga Merkulova 3 .zip(.war) VS .jar
  4. 4. 4.07.18 Igor Khokhriakov & Olga Merkulova 4 .war VS .jar ● For production deployment: – Allows fine Tomcat tuning – High load (1K-10K users) – Standard enterprise infrastructure ● Embedded Tango device – configuration in WEB-INF/web.xml ● For development/small production deployment ● Standalone Tango device ● Integration with standard Tango tools (Astor) – Using launch script ● Dokerized
  5. 5. Tango device (TangoRestServer) propertiesTango device (TangoRestServer) properties TANGO_DB [optional: default=tango://localhost:10000/sys/database/2] defines which tango_host(database) will be exported through this server. NOTE deprecated since rc4-x TANGO_ACCESS [optional: default=tango://localhost:10000/sys/access_control/1] defines which TangoAccessControl device will be used for authentication. Maybe set to none this disables TangoAccessControl integration TOMCAT_PORT [optional:default=10001] a port on which embedded tomcat will run TOMCAT_AUTH_METHOD [optional:default=plain] defines which type of authentication mechanism will be used [plain|kerberos].
  6. 6. mTangoREST.server project overviewmTangoREST.server project overview
  7. 7. 4.07.18 Igor Khokhriakov & Olga Merkulova 7 Clone from GitHub → Apache Maven* project – pom.xml – project description: ● Dependencies, maven central ● Build steps ● Profile based configuration ● IMPORTANT: entry point for IDE – Konsole commands e.g. mvn clean package [­ Dmaven.test.skip=true] – More info: https://maven.apache.org/ *auto build tool for Java projects
  8. 8. 4.07.18 Igor Khokhriakov & Olga Merkulova 8 Open and setup in intelliJ IDEA* 1) Open pom.xml 2) Run→Edit configurations... *similar for Eclipse or Netbeans
  9. 9. 4.07.18 Igor Khokhriakov & Olga Merkulova 9 mTangoREST.server request pipeline *org.tango.web.server.filters **org.tango.web.server.providers ***org.tango.web.server.resolvers, .interceptors
  10. 10. 4.07.18 Igor Khokhriakov & Olga Merkulova 10 Tango JAX-RS resources = Tango entities (aka device, attribute, commands etc) in mTangoREST.server.
  11. 11. DebuggerDebugger
  12. 12. DeploymentDeployment
  13. 13. 4.07.18 Igor Khokhriakov & Olga Merkulova 13
  14. 14. 4.07.18 Igor Khokhriakov & Olga Merkulova 14
  15. 15. 4.07.18 Igor Khokhriakov & Olga Merkulova 15 Security – Plain aka text security: ● Configure via Tango device properties: TOMCAT_USERS – comma separated usernames TOMCAT_PASSWORDS – comma separated passwords – Kerberos integration: ● Uses /etc/krb5.conf – LDAP – to be implemented – TangoAccessControl validates each request
  16. 16. Questions?Questions?
  17. 17. Exercise:Exercise: I. mTangoREST.server installation guide*I. mTangoREST.server installation guide* * https://github.com/tango-controls/tango-webapp/wiki/TangoWebapp-Workshop@SOLARIS

×