Deploy flask application

21 views
Skip to first unread message

Pavithra Chellakumar

unread,
Sep 7, 2020, 12:35:40 PM9/7/20
to Ansible Project

How to deploy python-flask application using ansible?

Dick Visser

unread,
Sep 7, 2020, 2:13:25 PM9/7/20
to ansible...@googlegroups.com
How do you deploy it now (without ansible)?

On Mon, 7 Sep 2020 at 18:35, Pavithra Chellakumar
<paviku...@gmail.com> wrote:
>
>
> How to deploy python-flask application using ansible?
>
> --
> You received this message because you are subscribed to the Google Groups "Ansible Project" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to ansible-proje...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/75969393-bc23-463c-87eb-46621b992fa7n%40googlegroups.com.



--
Dick Visser
Trust & Identity Service Operations Manager
GÉANT

Sudheer Satyanarayana

unread,
Sep 8, 2020, 1:43:24 AM9/8/20
to ansible...@googlegroups.com




How to deploy python-flask application using ansible?

There are many ways to do it. First you have to define the steps. Then use Ansible to carry out those steps or tasks.

Here's how I do it. I have written a generic role to deploy Flask apps. I have a playbook that executes the role.

1. Check out the Git repository to a source directory

2. Copy the source files to destination directory

3. Update/install Python packages in the virtual environment

4. Run DB migrations

5. Run some CLI commands

6. Restart systemd units


--
Sudheer Satyanarayana
Gavika Information Technologies Pvt. Ltd.
Mobile: 99005 07499
http://www.gavika.com

Abhijeet Kasurde

unread,
Sep 8, 2020, 3:25:31 AM9/8/20
to ansible...@googlegroups.com
Take a look at this already available role - https://github.com/vitalk/ansible-flaskapp. You might want to change as per your environment.

--
You received this message because you are subscribed to the Google Groups "Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ansible-proje...@googlegroups.com.


--
Thanks,
Abhijeet Kasurde
Reply all
Reply to author
Forward
0 new messages