How can i install tomcat server on my salt-minion

503 views
Skip to first unread message

Madhu Nali

unread,
Apr 9, 2014, 6:50:38 AM4/9/14
to salt-...@googlegroups.com
I tried to install apache tomcat on my salt-minion like below

vi /srv/salt/tomcat.sls
tomcat:
archive:
    - extracted
    - name: /opt/
    - source: http://tomcat.apache.org/download-70.cgi/apache-tomcat-7.0.47.tar.gz
    - source_hash: md5=efbae77efad579b655ae175754cad3df
    - archive_format: tar
    - tar_options: z
    - if_missing: /opt/apache-tomcat-7.0.47
Then i executed command salt-call state.sls tomcat then i am getting like below 
ubuntu:
----------
          ID: tomcat
    Function: archive.extracted
        Name: /opt/
      Result: False
     Comment: File sum set for file /var/cache/salt/minion/_opt_apache-tomcat-7.0.47.tar of efbae77efad579b655ae175754cad3dd does not match real sum of dbe64e2e9c509f949539b41447a875e5
     Changes:   
              ----------
              diff:
                  New file

Summary
------------
Succeeded: 0
Failed:    1
------------
Total:     1
I don't know whether the code is correct or not 
Can any one suggest me perfect code to install tomcat on salt-minion


Denis Witt

unread,
Apr 9, 2014, 7:08:19 AM4/9/14
to salt-...@googlegroups.com
On Wed, 9 Apr 2014 03:50:38 -0700 (PDT)
Madhu Nali <madhu...@gmail.com> wrote:

> http://tomcat.apache.org/download-70.cgi/apache-tomcat-7.0.47.tar.gz

Your state looks fine.

When I call the URL above I got a website, not a file. So Salt is
probably correct saying that the checksum doesn't match.

A proper download URL for Tomcat is:
http://apache.mirror.digionline.de/tomcat/tomcat-7/v7.0.53/bin/apache-tomcat-7.0.53.tar.gz

Please notice that this is a newer version, the md5-hash is
7062e134b4390e2ce6b54081aab26e3c.

Regards.
signature.asc

Madhu Nali

unread,
Apr 9, 2014, 7:35:11 AM4/9/14
to salt-...@googlegroups.com
Thanks for your reply, I tried with the details sent by you still unable to install tomcat getting like

local:
----------
          ID: tomcat
    Function: archive.extracted
        Name: /opt/
      Result: False
     Comment: Source hash file 7062e134b4390e2ce6b54081aab26e3c contains an invalid hash format, it must be in the format <hash type>=<hash>
     Changes:

Summary
------------
Succeeded: 0
Failed:    1
------------
Total:     1

How can i get the source_hash  value and you sent me a file signature.asc how can i use that

Madhu Nali

unread,
Apr 9, 2014, 7:45:22 AM4/9/14
to salt-...@googlegroups.com
Sorry i did a small mistake now i am able to install tomcat.Please let me know how can i get the source_hash value


Tim O'Guin

unread,
Apr 9, 2014, 9:36:29 AM4/9/14
to salt-...@googlegroups.com
You can get the MD5 hash of a file by running 'md5sum filename'


On Wed, Apr 9, 2014 at 6:45 AM, Madhu Nali <madhu...@gmail.com> wrote:
Sorry i did a small mistake now i am able to install tomcat.Please let me know how can i get the source_hash value



--
You received this message because you are subscribed to the Google Groups "Salt-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to salt-users+...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Denis Witt

unread,
Apr 9, 2014, 9:36:49 AM4/9/14
to salt-...@googlegroups.com
It's the hash-value of the downloaded file. It's used by salt to
determine if the download is intact. You can get the hash-value either
from the tomcat project website, or you can download the file manually
and run "md5sum" on the downloaded file (but make sure the download is
intact first).

Regards.
signature.asc
Reply all
Reply to author
Forward
0 new messages