Select Page

How to deploy 1 file with Anthill Pro

The reason I am writing this post is because I noticed people typing this search into google, and our blog coming up. I like to look at those searches to ensure we are giving people the content they are looking for.

Therefore, if someone is searching for something like that, that tells me that we’re likely dealing with a person that has a demo copy of Anthill Pro and simply wants to know how to use it. Understandably, Anthill Pro can appear complicated.

If you wanted to deploy 1 file to some agent just to see how Anthill works, this is what you’d need to do. Please bear in-mind, this is complex and not meant to be simple, however once you understand more about how anthill works, you will understand why.

  • Install and start the anthill pro server
  • Install an agent either on the server or on some other computer. The installer for the agent and server are in the same bundle usually.
  • When configuring the agent, upon install make sure to put the hostname of the server that has the anthill server software running on it.
  • Be sure to start the agent. It does not start by default.
  • As admin go: System -> Agents -> Available — you should see the agent you just installed on the list. Click it, and choose an environment for it. If you want to have this agent be in another environment then what is listed, you will need to add one at System -> Environments.
Now that you have an agent configured and setup, you can create a workflow to perform your deployment (File copy).
Generally, you copy files from Anthill to a target host running an agent. Before you do that, you have to store the files inside Anthill’s codestation repository. This is the difference between “Artifact Deliver” and “Resolve My Artifacts”. Artifact deliver collects files and stores them in Anthill, while Resolving, refers to copying from Anthill to the host. This can be confusing, but get used to it. Artifact deliver steps, generally occur in a build. And resolving artifacts, generally occur in a deployment.
To make this simple, we’ll create a codestation project, put some files in it, then deploy it to 1 host. A codestation project in Anthill is a special project designed to hold binary artifacts. This is great to store things like apache, jboss, jdbc drivers, basically all your components which you can deploy in any way you see fit.
  • Go to: Administration ->
  • Create a folder
  • Create a Codestation project in the folder
  • Give it a name, choose Example Life-Cycle Model, click Done.
  • Click the codestation project you just made.
  • Click “new” to make a new Build Life
  • For “Stamp” put 1, this will be version 1 of your component.
  • Click save
  • Click upload file
  • Choose “APP” for artifact set.
  • Click choose file, upload whatever file you want. If you upload many files, that will take a zip file you upload and unzip it in codestation.
  • If you enter something into directory, anthill will prefix a path to all the file(s) you’ve uploaded.
Now that you have a file in your codestation repository:
  • Inside your folder: create a project (non-life-cycle based)
  • Put it in the default environment group.
  • Create a job in the project.
    • Create a step
    • Artifacts -> Resolve another project’s artifacts.
    • Choose your codestation project.
    • Click set
    • Choose “APP” artifact set
    • In the stamp put 1 because we want version 1
    • Click save, click the project name in the breadcrumb header.
  • In the project, create a new workflow.
  • Check off all environments, click save.
  • In the workflow, click “definition”.
    • Select “embeded definition”
    • Click start
    • Insert after
    • Choose your job
    • Choose “All ancestor jobs success” for the Pre-Condition
    • Choose “Fixed Agent Selection” for Agent filter and choose the agent you previously installed and click the plus.
    • Choose “Default” for working directory.
    • Click insert job.
  • Go to: System -> Work Dir Scripts -> Default
    • Change the path to the path you want your file to be deployed on your server.
    • Click save
  • Click Dashboard
  • Click the workflow you created
    • Choose your environment, click run.
That’s how you copy 1 file in Anthill Pro. Having this experience will reward you with enough information to maybe do something useful. Add jobs, split them, add agents, environment, go nuts.