AnyCloud
Search…
Project Structure

.git

The AnyCloud CLI expects your project to be version controlled with git. However, it is not required for your repository to be hosted in a remote git server like GitHub or GitLab.

Dockerfile

Deploying an AnyCloud App requires a Dockerfile file located within the top level folder of your project next to your anycloud.json. AnyCloud will expect the docker container described by the Dockerfile to have a HTTP server listening on port 8088 like the one here.

anycloud.json

AnyCloud Deploy Configs are stored in an anycloud.json within the project directory, next to your Dockerfile, and configured using the CLI subcommands under anycloud config. Each Deploy Config consists of a name, or alias, to refer to it when creating or updating Apps. A Deploy Config consists of one or multiple of the following configurations: region, virtual machine type and an existing Credentials name or alias.
1
$ anycloud config add
2
Name for new Deploy Config: staging
3
Pick Credentials to use:
4
> mystartup-aws
5
? Do you want to choose a specific region for this Deploy Config? › y
6
Region name: us-west-1
7
? Do you want to select which virtual machine type to use for this Deploy Config? › y
8
Virtual Machine Type: t2.medium
9
? Do you want to add another region to this Deploy Config? › n
10
? Minimum number of VMs per region or cloud › 1
11
? Would you like to define a maximum number of VMs? › n
12
Successfully created "staging" Deploy Config.
13
14
$ anycloud config add
15
Name for new Deploy Config: production
16
Pick Credentials to use:
17
> mystartup-aws
18
? Do you want to choose a specific region for this Deploy Config? › y
19
? Region name: us-west-1
20
? Do you want to select which virtual machine type to use for this Deploy Config? › y
21
? Virtual Machine Type: t2.xlarge
22
? Do you want to add another region to this Deploy Config? › n
23
? Minimum number of VMs per region or cloud › 2
24
? Would you like to define a maximum number of VMs? › n
25
Successfully created "production" Deploy Config.
26
27
$ anycloud config list
28
29
Deployment configurations:
30
31
┌────────────┬─────────────────┬───────────┬───────────┐
32
│ Name │ Credential Name │ Region │ VM Type │
33
├────────────┼─────────────────┼───────────┼───────────┤
34
│ production │ mystartup-aws │ us-west-1 │ t2.xlarge │
35
│ staging │ mystartup-aws │ us-west-1 │ t2.medium │
36
└────────────┴─────────────────┴───────────┴───────────┘
Copied!
The resulting anycloud.json contains two Deploy Configs called staging and production and looks like this:
1
{
2
"staging": [{
3
"cloudProvider": "AWS",
4
"region": "us-west-1",
5
"vmType": "t2.medium",
6
"credentialsName": "mystartup-aws",
7
"minReplicas": 1
8
}],
9
"production": [{
10
"cloudProvider": "AWS",
11
"region": "us-west-1",
12
"vmType": "t2.xlarge",
13
"credentialsName": "mystartup-aws",
14
"minReplicas": 2
15
}]
16
}
Copied!
Each cloud provider will have a different possible values for region and virtual machine type.
Note: AnyCloud does not currently support any ARM based VMs.
Last modified 6mo ago