Uploaded image for project: 'IGB'
  1. IGB
  2. IGBF-1431

Write a provisioning script to set up app store on ec2 instance. (Bash script)

    Details

    • Type: Task
    • Status: Closed (View Workflow)
    • Priority: Major
    • Resolution: Done
    • Affects Version/s: None
    • Fix Version/s: None
    • Labels:
      None
    • Story Points:
      0.25
    • Sprint:
      Fall 2018 Sprint 4, Fall 2018 Sprint 5, Winter 2018 Sprint 1, Winter 2018 Sprint 2

      Attachments

        Activity

        Hide
        stiwari8 Srishti Tiwari (Inactive) added a comment -

        The script ran flawlessly on the machine. Didnt face issues even if some packages were already installed.

        Show
        stiwari8 Srishti Tiwari (Inactive) added a comment - The script ran flawlessly on the machine. Didnt face issues even if some packages were already installed.
        Hide
        ann.loraine Ann Loraine added a comment -

        Merged to master and moved to next lane.

        Show
        ann.loraine Ann Loraine added a comment - Merged to master and moved to next lane.
        Hide
        sneha Sneha Ramesh Watharkar (Inactive) added a comment -

        Done with the changes mentioned above. PR is ready.

        Show
        sneha Sneha Ramesh Watharkar (Inactive) added a comment - Done with the changes mentioned above. PR is ready.
        Hide
        ptambvek Pranav Sanjay Tambvekar (Inactive) added a comment -

        The script looks good.
        The script, along with the steps documented at
        https://bitbucket.org/ptambvekar/igb-appstore/src/IGBF-1432-update-appstore-documentation/
        should help to set up the Appstore.

        Show
        ptambvek Pranav Sanjay Tambvekar (Inactive) added a comment - The script looks good. The script, along with the steps documented at https://bitbucket.org/ptambvekar/igb-appstore/src/IGBF-1432-update-appstore-documentation/ should help to set up the Appstore.
        Hide
        sneha Sneha Ramesh Watharkar (Inactive) added a comment - - edited

        Pranav Sanjay Tambvekar
        Done with the changes mentioned above.
        https://bitbucket.org/swathark/sneha-igbappstore/branch/IGBF-1431
        please review once and move to the next column in case its correct.

        Show
        sneha Sneha Ramesh Watharkar (Inactive) added a comment - - edited Pranav Sanjay Tambvekar Done with the changes mentioned above. https://bitbucket.org/swathark/sneha-igbappstore/branch/IGBF-1431 please review once and move to the next column in case its correct.
        Hide
        ptambvek Pranav Sanjay Tambvekar (Inactive) added a comment - - edited

        Sneha Ramesh Watharkar, according to the Django documentation, (https://docs.djangoproject.com/en/2.1/ref/databases/),
        the mysqlclient is the recommended choice for MySQL for django. Also, python-mysqldb is seen to give trouble for python 3.

        There are few other changes required, which I found while setting up a new EC2 ubuntu instance:

        aptpackages=("python3" "python3-pip" "apache2" "libapache2-mod-wsgi-py3" "zlib1g-dev" "python-dev" "libmysqlclient-dev" "libjpeg-dev" "libpng-dev" "mysql-server")
        pippackages=("wheel" "django==1.8" "Pillow" "social-auth-app-django" "whoosh" "ipython" "django-haystack==2.2" "mysqlclient")

        Show
        ptambvek Pranav Sanjay Tambvekar (Inactive) added a comment - - edited Sneha Ramesh Watharkar , according to the Django documentation, ( https://docs.djangoproject.com/en/2.1/ref/databases/ ), the mysqlclient is the recommended choice for MySQL for django. Also, python-mysqldb is seen to give trouble for python 3. There are few other changes required, which I found while setting up a new EC2 ubuntu instance: aptpackages=("python3" "python3-pip" "apache2" "libapache2-mod-wsgi-py3" "zlib1g-dev" "python-dev" "libmysqlclient-dev" "libjpeg-dev" "libpng-dev" "mysql-server") pippackages=("wheel" "django==1.8" "Pillow" "social-auth-app-django" "whoosh" "ipython" "django-haystack==2.2" "mysqlclient")
        Hide
        sneha Sneha Ramesh Watharkar (Inactive) added a comment -

        made changes and provided explanations. Please review it. Moving to "Need review" column.

        Show
        sneha Sneha Ramesh Watharkar (Inactive) added a comment - made changes and provided explanations. Please review it. Moving to "Need review" column.
        Hide
        sneha Sneha Ramesh Watharkar (Inactive) added a comment -

        Pranav Sanjay Tambvekar May I know why is this required? Both packages do the same thing. "instead of python-mysqldb install pip3 install mysqlclient". ?
        **libapache2-mod-wsgi-py3 - already there in the script.
        **pip3 install django-haystack - cannot include this because it need django 2.1 to work and we have 1.8 version in the project. Right now we need to find some other solution or we need to find haystack compatible with django 1.8 and then include it. But I think Haystack need Django 2.1 and if I try to install it then it uninstalls current version and reinstalls 2.1 version which jeopardizes the other parts of the application.
        **sudo apt-get install libjpeg-dev - Done
        **sudo apt-get install libpng-dev - Done
        **pip3 install ipython - Done
        **mysql-server - Done

        Show
        sneha Sneha Ramesh Watharkar (Inactive) added a comment - Pranav Sanjay Tambvekar May I know why is this required? Both packages do the same thing. "instead of python-mysqldb install pip3 install mysqlclient". ? **libapache2-mod-wsgi-py3 - already there in the script. **pip3 install django-haystack - cannot include this because it need django 2.1 to work and we have 1.8 version in the project. Right now we need to find some other solution or we need to find haystack compatible with django 1.8 and then include it. But I think Haystack need Django 2.1 and if I try to install it then it uninstalls current version and reinstalls 2.1 version which jeopardizes the other parts of the application. **sudo apt-get install libjpeg-dev - Done **sudo apt-get install libpng-dev - Done **pip3 install ipython - Done **mysql-server - Done
        Hide
        sneha Sneha Ramesh Watharkar (Inactive) added a comment -

        Pranav Sanjay Tambvekar
        I did not include the steps
        mkdir /var/www/CyAppStore
        mv * /var/www/CyAppStore
        mkdir logs
        sudo chgrp -R www-data *
        sudo chgrp -R www-data .git*
        because when the user installs apache server then there will automatically be /var/www folder. User need not create it. Once the dependencies are installed. He has to move the entire project to /var/www/ manually so that he understands that he is using apache. Also if the user prefers some other web server then this step being automated in the script would mislead and we need to change the script later to make it generic. So, I think Its better to state these steps manually in the instructions after running this script.

        Show
        sneha Sneha Ramesh Watharkar (Inactive) added a comment - Pranav Sanjay Tambvekar I did not include the steps mkdir /var/www/CyAppStore mv * /var/www/CyAppStore mkdir logs sudo chgrp -R www-data * sudo chgrp -R www-data .git* because when the user installs apache server then there will automatically be /var/www folder. User need not create it. Once the dependencies are installed. He has to move the entire project to /var/www/ manually so that he understands that he is using apache. Also if the user prefers some other web server then this step being automated in the script would mislead and we need to change the script later to make it generic. So, I think Its better to state these steps manually in the instructions after running this script.
        Hide
        ptambvek Pranav Sanjay Tambvekar (Inactive) added a comment - - edited

        The document has been updated. Can you please update the script to include the additional dependencies?

        https://bitbucket.org/ptambvekar/igb-appstore/src/IGBF-1432-update-appstore-documentation/

        missing steps that can be included in the script:

        mkdir /var/www/CyAppStore
        mv * /var/www/CyAppStore
        mkdir logs
        sudo chgrp -R www-data *
        sudo chgrp -R www-data .git*
        **instead of python-mysqldb install pip3 install mysqlclient
        **libapache2-mod-wsgi-py3
        **pip3 install django-haystack
        **sudo apt-get install libjpeg-dev
        **sudo apt-get install libpng-dev
        **pip3 install ipython
        **mysql-server

        Show
        ptambvek Pranav Sanjay Tambvekar (Inactive) added a comment - - edited The document has been updated. Can you please update the script to include the additional dependencies? https://bitbucket.org/ptambvekar/igb-appstore/src/IGBF-1432-update-appstore-documentation/ missing steps that can be included in the script: mkdir /var/www/CyAppStore mv * /var/www/CyAppStore mkdir logs sudo chgrp -R www-data * sudo chgrp -R www-data .git* **instead of python-mysqldb install pip3 install mysqlclient **libapache2-mod-wsgi-py3 **pip3 install django-haystack **sudo apt-get install libjpeg-dev **sudo apt-get install libpng-dev **pip3 install ipython **mysql-server
        Hide
        sneha Sneha Ramesh Watharkar (Inactive) added a comment -

        Script can be found in the following branch: https://bitbucket.org/swathark/sneha-igbappstore/branch/IGBF-1431

        Show
        sneha Sneha Ramesh Watharkar (Inactive) added a comment - Script can be found in the following branch: https://bitbucket.org/swathark/sneha-igbappstore/branch/IGBF-1431
        Hide
        sneha Sneha Ramesh Watharkar (Inactive) added a comment -

        Written a bash script to install dependency packages required by App store. It also creates a virtual environment for the project (as recommended by django community).
        After cloning the app store repository in a folder. We need to run the script file. once the script is executed, we should move the project folder to the /var/www folder.

        Show
        sneha Sneha Ramesh Watharkar (Inactive) added a comment - Written a bash script to install dependency packages required by App store. It also creates a virtual environment for the project (as recommended by django community). After cloning the app store repository in a folder. We need to run the script file. once the script is executed, we should move the project folder to the /var/www folder.

          People

          • Assignee:
            stiwari8 Srishti Tiwari (Inactive)
            Reporter:
            sneha Sneha Ramesh Watharkar (Inactive)
          • Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: