Skip to content

Instantly share code, notes, and snippets.

@stepharr
Last active February 12, 2016 15:39
Show Gist options
  • Save stepharr/2ccdf51a1e73924f564b to your computer and use it in GitHub Desktop.
Save stepharr/2ccdf51a1e73924f564b to your computer and use it in GitHub Desktop.

Revisions

  1. stepharr revised this gist Feb 12, 2016. No changes.
  2. stepharr created this gist Feb 12, 2016.
    68 changes: 68 additions & 0 deletions Deploying Resume Wrangler
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,68 @@
    ## Deploying Resume Wrangler

    ### Downloading App

    1. Create a repo folder
    2. Download git repo

    ```sh
    git clone https://avalonconsultingllc.git.beanstalkapp.com/avalonresumewrangler.git
    ```

    ### Installing & Starting Dependencies: Python, Elasticsearch

    1. Check your version of Python and verify it's 2.7.*, Install Python if you don't have it.

    python --version
    2. Install Node.js, Bower, Grunt, & PIP

    sudo easy_install pip
    npm install -g grunt-cli
    3. Install the python dependencies

    cd <repo>/back-end/api
    sudo pip install -r requirements.txt
    4. Install Elasticsearch
    >https://download.elasticsearch.org/elasticsearch/release/org/elasticsearch/distribution/zip/elasticsearch/2.2.0/elasticsearch-2.2.0.zip

    5. Run Elastic
    ```sh
    cd <elasticsearch install directory>/bin
    ./elasticsearch
    ```

    ### Load data into Elasticsearch

    1. Open a new tab in terminal

    cd <repo>/back-end/elasticsearch/bin/
    2. There are 3 files (`convert.py`, `import_skills.py`, & `load.py`) which you have to edit the path variable to your local folder.

    i. In `convert.py` edit the `AUX_CONTACT_FILE` variable to your location of `avalon_contacts.json`

    > In terminal, you can navigate to the `avalon_contacts.json` file and then `pwd` to show the directory path and copy it from there.

    ii. In `import_skills.py` & `load.py` edit the `GIT_BASE_DIR` variable to your location of the Resume Wrangler repo

    3. Convert the XML to JSON using convert.py

    python convert.py ../../data/resume-xml /tmp/resume-json
    4. Load the generated JSON

    python load.py /tmp/resume-json
    5. Import skills from data/skills.json

    python import-skills.py <repo>/data/skills.json
    6. Start the Flask server

    cd <repo>/back-end/api/app/app.py
    python app.py
    ### Launch Application

    1. Open a new tab in terminal

    cd front-end/
    npm install
    grunt watch

    2. Open a browser and go to localhost:9200