Deploy Aineko Projects
Pre-requisite
You will need to have an Aineko project that runs locally before we can deploy it into the cloud. If you do not have one yet, set one up in minutes at Aineko Documentation - Quickstart!
Create Deployment Configuration
To make your Aineko project cloud-ready, simply a valid deploy.yml
in the base directory of your repository. This file configures the cloud infrastructure that runs your Aineko project. Refer to the deployment configuration guide for the full documentation on how to customize it.
deploy.yml
example
This example will work with the starter pipeline found in the Aineko Documentation - Quickstart
Connect repository to GitHub (if not already connected)
Aineko Cloud requires a GitHub repository set-up to use as the source of truth (as part of GitOps). If your local Aineko project has not been connected to a GitHub repository, follow these steps to set it up. In the following example, we will push the project to a repository called test
owned by the GitHub username craycrayfish
.
-
Create a GitHub repository by following these instructions (Create one without adding any of the suggested initialization files).
-
Create a local Aineko project by following the aineko quickstart.
In the Aineko project directory, run the following commands
- First initialize the local directory as a git directory
$ git init -b develop Initialized empty Git repository in Users/usr/my_aineko_project
- Then add all files as an initial commit
$ git add . $ git commit -m "Initial commit" 9 files changed, 380 insertions(+) create mode 100644 .gitignore create mode 100644 README.md create mode 100644 conf/pipeline.yml create mode 100644 my_awesome_pipeline/__init__.py create mode 100644 my_awesome_pipeline/config.py create mode 100644 my_awesome_pipeline/nodes.py create mode 100644 pyproject.toml create mode 100644 tests/__init__.py create mode 100644 tests/test_nodes.py
- Add the GitHub remote repository URL to the local git repository. The value of
<REMOTE_URL>
should look something likegit@github.com:craycrayfish/test.git
, and can be found on the front page of the GitHub repository. $ git remote add origin <REMOTE_URL> $ git remote -v origin git@github.com:craycrayfish/test.git (fetch) origin git@github.com:craycrayfish/test.git (push)
$ git push --set-upstream origin develop Enumerating objects: 13, done. Counting objects: 100% (13/13), done. Delta compression using up to 10 threads Compressing objects: 100% (12/12), done. Writing objects: 100% (13/13), 3.98 KiB | 3.98 MiB/s, done. Total 13 (delta 1), reused 0 (delta 0), pack-reused 0 remote: Resolving deltas: 100% (1/1), done. To github.com:craycrayfish/test.git * [new branch] develop -> develop branch 'develop' set up to track 'origin/develop'.
You have successfully connected your local repository to GitHub.
Trigger a Deployment
Ensure initialization is complete before proceeding
Deployments will fail until initialization of the Aineko Cloud project (the previous step) is complete. You can check the status of initialization in the Workflows
page. After all, we can't build anything stable if the foundations haven't been laid yet!
- To trigger a deployment of the Aineko project, simply make a commit to your Aineko Project GitHub repository. For example, to deploy to the
develop
environment (more on environments here), we would do the following: -
Checkout to the develop branch (if it doesn't yet exist)
git checkout -b develop
-
then make a commit and push
git add . git commit -m "first deployment!" git push
This should trigger a new Continuous Deployment
workflow that will show up on the Workflows
page.