Documentation
  • Introduction
  • Why Ampersand?
    • The Business Rules Manifesto and Ampersand
  • Tutorial
    • Example system: Enrollment
    • Conceptual Model: Enrollment
    • Your tool: RAP4
    • Making your first Ampersand script
  • Reactive programming
  • The language Ampersand
    • How to read syntax statements
    • Truth
    • Atoms
    • The CONCEPT statement
    • The RELATION statement
    • The MEANING statement
    • The PURPOSE statement
    • The CLASSIFY statement
    • The RULE statement
    • Terms
      • Semantics
      • Semantics in logic
        • Primitive terms
        • Boolean operators
        • Relational operators
        • Residual operators
      • Semantics in natural language
        • Primitive terms in natural language
        • Boolean operators in natural language
        • Relational operators in natural language
        • Residual operators in natural language
      • Semantics in sets
        • Primitive terms in set theory
        • Boolean operators in set theory
        • Relational operators in set theory
      • Semantics of terms, defined algebraically
        • Boolean operators in algebra
        • Relational operators in algebra
      • Semantics visualized
        • Semantics of boolean operators visualized
        • Semantics of relational operators visualized
        • Semantics of residuals visualized
    • Context
    • Module
    • Best Practices
    • Syntactical Conventions
      • The CONCEPT statement
      • The RELATION statement
      • The RULE statement
      • The CONTEXT statement
      • The INCLUDE statement
      • Explanation
      • Patterns
      • Population
        • Population in spreadsheets
      • The PURPOSE statement
      • The IDENT statement
      • The TABLE statement
      • Language support
    • The INCLUDE statement
    • Patterns
    • Services
      • Example: Client
      • Example: Login
      • Syntax and meaning
      • Explanation
      • Layout of user interfaces
        • Your own widgets (HTML and CSS)
      • CRUD
    • Population
      • Population in spreadsheets
    • The ENFORCE statement
    • The IDENT statement
    • The TABLE statement
    • Language support
    • Current date
    • The Preprocessor
    • Design considerations
  • Running the Ampersand compiler
    • Configuration
    • Commands (vs. 4.0.0 and later)
    • Options (up to vs. 3.17.4)
  • Architecture of an Ampersand Application
    • Backend framework
    • Hooks
    • Extensions
      • The ExecEngine
  • Deploying your Ampersand script
    • Compiler
    • Deploy your own web application on your laptop
    • Prototype multi-stage build
    • Prototype database
  • Reusing Available Modules
    • Modules
    • Security
    • SIAM (Sessions, Identity and Access Management) Module
  • Exercises
    • Delivery
    • VOG (in Dutch)
  • Installing Ampersand
    • Deploying your Prototype
    • Installing the tools manually
  • Modeling
    • Domain Driven Design
    • Data modeling
    • Legal modeling
    • Architecture modeling
    • Metamodeling
    • Limitations of Ampersand
  • Configuring your application
  • The Excel Importer
  • Plans
    • Current State
    • NoSQL storage
    • API documentation
    • OWL and RDFS input
    • Refactor the front-end
  • Research
Powered by GitBook
On this page
  • What do you need to understand?
  • What do you need up front?
  • What do you do to run your Ampersand program?
  • Deploying
  • Redeploying
  • In trouble?
Export as PDF
  1. Installing Ampersand

Deploying your Prototype

How do you get started if you just want to build and run your first prototype? Read this page, which is full of hyperlinks to background knowledge you will need in the future if you deploy more often.

PreviousInstalling AmpersandNextInstalling the tools manually

Last updated 5 years ago

What do you need to understand?

We use a to run your Ampersand program on virtually any computer. So go ahead and if you don't already have it. You provide (once) a recipe for building (Dockerfile) and a description of the configuration (docker-compose.yml). We'll provide examples for you to adapt.

  1. Your Ampersand prototype will run in a , which is a virtual machine.

  2. The container is started and stopped by docker-compose, which uses a

    that is built with your Dockerfile and deployed with your docker-compose.yml file.

  3. your image from your , using the command docker-compose up -d. You can verify that it runs with docker ps.

  4. Access your application through your browser, using <TODO: Which URL?>

Please watch (8 minutes) to see what Docker does to bring up your Ampersand program as a web application on your own machine.

What do you need up front?

You need a computer that runs Docker and that has an internet connection. That lets you generate a Docker image from your Ampersand source code. Then run your program on Docker on localhost.

What do you do to run your Ampersand program?

First, you create a directory in which you will organize your Ampersand (.adl) files and some other stuff. We will refer to this directory as your working directory. In this working directory, make sure you have:

  1. A file called Dockerfile, which contains the recipe for creating a Docker image

  2. A file called docker-compose.yml, which contains the runtime configuration of the containers running your program.

  3. The source code of your Ampersand program, as specified in Dockerfile and docker-compose.yml.

Then from you command line interface run:

docker-compose up -d

Sit back and watch. Don't worry, the second time around Docker downloads much less as it builds up its local image repository.

Deploying

The deployment consists of the following steps:

  1. Copy your .adl-file to a working directory on your server.

  2. Get two docker-files from internet by executing the following commands:

     wget https://raw.githubusercontent.com/AmpersandTarski/Ampersand/feature/dockerize/docker/sample/Dockerfile
     wget https://raw.githubusercontent.com/AmpersandTarski/Ampersand/feature/dockerize/docker/sample/docker-compose.yml

    On servers other than Linux, you may need another command than wget, but the files are the same.

  3. In the file called

    docker-compose.yml

    you must specify your own

    .adl

    -file:

  4. Run docker-compose to deploy your prototype by executing the following command:

     docker-compose up

    Alternatively, if you want your prototype to keep running after you have closed your CLI, execute:

     docker-compose up -d
  5. Browse to the web-location my.server.com, where the prototype is being served.

Redeploying

After you deploy the first time, you may want to edit your program. Just save the results and redeploy with the command:

docker-compose up -d --build

If you want to see which images are stored on your local computer, type

docker images

In trouble?

  • Check if there is a firewall that blocks the port from internet. Make sure that port 80 is open for http-traffic.

  • Check the port settings and adapt docker-compose.yml if you must use a port other than port 80.

  • Use a recent browser. We have developed Ampersand on FireFox and tested it on FireFox and Chrome, so you should be fine with one of these two.

If you have trouble with the database (e.g. you cannot login, or do not have the correct authorization), check out the for creating a properly authorized user ampersand for the database. As you can see in docker-compose.yml, the database itself is accessible through port 8080.

It is a good idea to deploy your webapplication to localhost for testing. However, if you use a subdomain (e.g. my.ampersand.app.localhost) you will find that your hosts-file does not support wildcard redirection. You can do this by installing a local dns server (details on )

docker-platform
install docker
container
docker-image
Run
command-line
this video
instructions
http://passingcuriosity.com/2013/dnsmasq-dev-osx/