In this recipe, we will learn how to install Tomcat packages, configure the appropriate files needed for Tomcat to function, and configure the Tomcat service.
We will use the same minion as in the previous recipe.
Create and edit
/opt/salt-cookbook/development/tomcat/init.sls
to have the following entries:include: - tomcat.java tomcat-server: archive: - extracted - name: /opt/ - source: http://mirror.nus.edu.sg/apache/tomcat/tomcat- 6/v6.0.43/bin/apache-tomcat-6.0.43.tar.gz - source_hash: md5=0abbb1852a608c8b4ccb7003c700337b - archive_format: tar - if_missing: /opt/apache-tomcat-6.0.43/ - require: - alternatives: set_java_alternative tomcat_symlink: file.symlink: - name: /opt/tomcat - target: apache-tomcat-6.0.43 - require: - archive: tomcat-server tomcat_init_script: file.managed: - name: /etc/init.d/tomcat - source: salt://tomcat/files/tomcat_init_script ...