<commit_before># nubis-dpaste
This is a Nubis deployment of the [dpaste](https://github.com/bartTC/dpaste) application. The purpose of this project is to demonstrate an example of a django / python deployment. This repository is an example of a "deployment repository", in other words a repository that does not contain any application code.

## Repository Structure
The structure of the repository is quite simple. The application is installed as a git submodule. There is a directory called *nubis* which contains all of the bits necessary to deploy the application.


## Deployment Process
Currently there are two steps necessary to deploy this project. While these steps are listed in order to build and deploy, it is typically not necessary to run the build steps. This means you can skip the [Nubis Builder](#nubis-builder) bits and jump straight to the [Cloudformation](#cloudformation) section.


### Puppet
We are using [puppet](http://puppetlabs.com/) in this example to bootstrap up our instance. Puppet installs and configures services such as *Apache* and *MySQL*. We are using the [nubis-puppet](https://github.com/Nubisproject/nubis-puppet) project for our module collection. This is conveniently installed on the *base image* (built by [nubis-base](https://github.com/Nubisproject/nubis-base)) that we are going to use as the starting image for our Packer build in the next step. This means that there is nothing for you to do here, however yo should be aware of this for when you deploy your own applications.


### Nubis Builder
[Nubis Builder](https://github.com/Nubisproject/nubis-builder) is the piece that will build our Amazon Machine Image (AMI). It is made up of a two pieces:

1. The [main.json](nubis/builder/provisioners.json) file which:
    * Contains one or more *provisioners* statements for calling  any bootstrapping commands for the application
    * Invokes a puppet standalone run through nubis-builder
    * Invokes a *builders* statement describing where to build the AMI, also run through nubis-builder
2. A [project.json](nubis/builder/project.json) file which contains settings for nubis-builder

To run nubis-builder, from the repository root you first need to ensure that you have installed the [prerequisites](https://github.com/Nubisproject/nubis-docs/blob/master/PREREQUISITES.md) and [nubis-builder](https://github.com/Nubisproject/nubis-builder#builder-quick-start). After which you simply call nubis-builder like so:
```bash
nubis-builder build
```
This takes around *8m7.350s* to complete.

### Terraform

The next step is to take the shiny new AMI that nubis-builder built and deploy it. This is where [Terraform](http://terraform.io) comes into play. Terraform is our infrastructure deployment framework, and it's a fantastic tool for the job. All in all, it consists of only a few files:

0. [terraform.tfvars-dist](nubis/terraform/terraform.tfvars-dist) simply lists the inputs you will need to provide
0. [main.tf](nubis/terraform/main.tf) is where the real heavy lifting takes place. This is where you describe your infrastructure. Things like worker pools, load balancers, DNS and so on.
0. [outputs.tf](nubis/terraform/outputs.tf) is where you can define handy outputs from your deployment, like the final URL of the deployed application.
0. [consul.tf](nubis/terraform/consul.tf) is where you can define the infrastructure settings your app needs access to.
0. [README.md](nubis/cloudformation/README.md) contains some handy cut-and-paste cheat-sheet style commands for your future reference.
<commit_msg>Fix to broken links<commit_after># nubis-dpaste
This is a Nubis deployment of the [dpaste](https://github.com/bartTC/dpaste) application. The purpose of this project is to demonstrate an example of a django / python deployment. This repository is an example of a "deployment repository", in other words a repository that does not contain any application code.

## Repository Structure
The structure of the repository is quite simple. The application is installed as a git submodule. There is a directory called *nubis* which contains all of the bits necessary to deploy the application.


## Deployment Process
Currently there are two steps necessary to deploy this project. While these steps are listed in order to build and deploy, it is typically not necessary to run the build steps. This means you can skip the [Nubis Builder](#nubis-builder) bits and jump straight to the [Terraform](#terraform) section.


### Puppet
We are using [puppet](http://puppetlabs.com/) in this example to bootstrap up our instance. Puppet installs and configures services such as *Apache* and *MySQL*. We are using the [nubis-puppet](https://github.com/Nubisproject/nubis-puppet) project for our module collection. This is conveniently installed on the *base image* (built by [nubis-base](https://github.com/Nubisproject/nubis-base)) that we are going to use as the starting image for our Packer build in the next step. This means that there is nothing for you to do here, however yo should be aware of this for when you deploy your own applications.


### Nubis Builder
[Nubis Builder](https://github.com/Nubisproject/nubis-builder) is the piece that will build our Amazon Machine Image (AMI). It is made up of a two pieces:

1. The [main.json](nubis/builder/provisioners.json) file which:
    * Contains one or more *provisioners* statements for calling  any bootstrapping commands for the application
    * Invokes a puppet standalone run through nubis-builder
    * Invokes a *builders* statement describing where to build the AMI, also run through nubis-builder
2. A [project.json](nubis/builder/project.json) file which contains settings for nubis-builder

To run nubis-builder, from the repository root you first need to ensure that you have installed the [prerequisites](https://github.com/Nubisproject/nubis-docs/blob/master/PREREQUISITES.md) and [nubis-builder](https://github.com/Nubisproject/nubis-builder#builder-quick-start). After which you simply call nubis-builder like so:
```bash
nubis-builder build
```
This takes around *8m7.350s* to complete.

### Terraform

The next step is to take the shiny new AMI that nubis-builder built and deploy it. This is where [Terraform](http://terraform.io) comes into play. Terraform is our infrastructure deployment framework, and it's a fantastic tool for the job. All in all, it consists of only a few files:

0. [terraform.tfvars-dist](nubis/terraform/terraform.tfvars-dist) simply lists the inputs you will need to provide
0. [main.tf](nubis/terraform/main.tf) is where the real heavy lifting takes place. This is where you describe your infrastructure. Things like worker pools, load balancers, DNS and so on.
0. [outputs.tf](nubis/terraform/outputs.tf) is where you can define handy outputs from your deployment, like the final URL of the deployed application.
0. [consul.tf](nubis/terraform/consul.tf) is where you can define the infrastructure settings your app needs access to.
0. [README.md](nubis/terraform/README.md) contains some handy cut-and-paste cheat-sheet style commands for your future reference.

{'fraction_non_alphanumeric': 0.07527032720123578, 'fraction_numerical': 0.0033703131582642886, 'mean_word_length': 4.68849840255591, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 12, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5574048', 'n_tokens_mistral': 1991, 'n_tokens_neox': 1958, 'n_words': 925}