Athento allows you to run custom code on dedicated instances.
Among the code it allows to deploy are:
- Operations
- commands
- HTML Templates
- API hooks
- Tray masks
To work with custom code, the following steps must be taken:
- Have a GIT repository
- Upload the code with the same structure that can be seen in the /var/www/athentose directory.
- Send an email to soporte@athento.com providing the URL of the GIT repository and providing read credentials, indicating on which instance the deployment of the custom code is requested. Occasionally, you can indicate the branch you want to use for deployments and the frequency of automatic deployment.
Updates
Code updates will be performed automatically, usually every hour or less.
Therefore, it should be noted that any code uploaded to the main branch of the repository will be automatically updated. It is therefore recommended to use different branches for development and work with Pull Requests to merge the code into the main branch.
Developers are responsible for uploading the final code to the repository. Uploading code to the repository is not part of the support.
Occasionally, Athento may be asked to manually update the code in special cases. In these cases, Athento support will be limited to the following commands:
- "git pull", to deploy the new code.
- "/scripts/soft_reload.sh" to apply the changes.
Support tickets should be titled "Upgrading custom code in instance", clearly indicating the instance for which the upgrade is requested.
How to deploy the code as a Django application
- Create symbolic link of the project in /var/www/athentose/athentose
- Configure the file /var/www/athentose/athentose/settings_config/custom/settings_custom_apps.py
Example command to create the symbolic link
ln -s /var/www/athentose/athentose/custom/MyApp /var/www/athentose/athentose
Example code for settings_custom_apps.py
CUSTOM_INSTALLED_APPS = ('MyApp', )
INSTALLED_APPS += CUSTOM_INSTALLED_APPS
Useful commands for uploading code to the repository
If you are working from a UAT environment on custom code, these commands are useful for uploading code to the repository:
- git add: to add new files to version control.
- git commit: to commit changes to the repository
- git push: to upload changes to the repository
Some resources about GIT
- https://www.w3schools.com/git/
- https://product.hubspot.com/blog/git-and-github-tutorial-for-beginners
Comments
0 comments
Please sign in to leave a comment.