training.shoppinpal.com
  • Introduction
  • 1. The Ideal Workspace
    • The Perfect Machine
      • For Biz Team
      • For Developers
      • For Designers
    • Setup a machine in the cloud
      • Solution
      • Setup box on Azure
        • Create a machine on Azure
        • Test drive your remote machine
        • Setup Dropbox On Azure
      • Setup box on DigitalOcean
        • Setup UI
        • Shared FileSystem
          • Dropbox
            • Use locally developed node modules in another project
          • sshfs
        • Long Running Sessions
      • Feedback
  • 2. Learning Git
    • Static Code Analysis
  • 3. The Backend
    • Use Containers
    • Setup a loopback project
    • Lockdown
    • Build a better mousetrap
    • The abyss stares back
    • Built-in models
    • Extending built-in models
    • Understanding UserModel
    • Boot Scripts
    • Promises
    • Find roles for current user
    • Loopback Console
    • Current User
  • 4. Multi-tenancy With Loopback
    • What is Multi-Tenancy
    • Architecting with Loopback
    • Define scope for Roles
    • Role Resolvers
    • Access Control For Tenants
    • Better Programming with multi-tenancy
  • 5. The Frontend
    • The Browser
    • Unit Testing
      • Motivation behind this blog
      • How to write a test
      • Karma and Jasmin
      • Writing Tests
    • End-2-End Testing
    • Angular 1.x
    • Angular 2
      • Testing
  • 6. ElasticSearch
    • Better Search with NGram
    • NGram with Elasticsearch
    • Fun with Path Hierarchy Tokenizer
    • Working with Mappings and Analyzers
  • 7. Promises
    • What are Promises
    • Promise Implementations
    • Nuances
    • What should we use
  • 8. Learning Docker
    • Docker Swarm
  • 9. Queues & Workers
    • PHP workers in AWS EBS
    • NodeJS workers in AWS EBS
      • SQS Daemon by AWS
      • SQS Daemon in NodeJS
      • SQS polling by worker
    • Gearman
  • 10. Docker
    • Capabilities
  • Appendix
    • Bug in WebStorm deployments
    • The Perfect Terminal
    • Scalable App Deployment with AWS
    • Chrome Tips & Tricks
    • Host your own Gitbook
    • Gitbook Tips & Tricks
    • How to handle support incidents
    • Dev Resources
    • Debug e2e Tests on CircleCI
    • Logging
    • Authentication Principles
    • Mac
    • nvm
    • Unify testing with npm
      • Debugging Mocha
    • Sequence Diagrams
    • Project Sync via IDE
      • SFTP with WebStorm
      • SFTP with Visual Studio
    • Soft Linking
    • NodeJS Profiling
      • How to find node.js performance optimization killers
    • Setup Packer on Azure
Powered by GitBook
On this page
  1. 1. The Ideal Workspace
  2. Setup a machine in the cloud
  3. Setup box on Azure

Test drive your remote machine

PreviousCreate a machine on AzureNextSetup Dropbox On Azure

Last updated 6 years ago

Test drive your remote machine

  1. Let's do a small exercise to show off the power of this setup.

  2. Clone a sample github project and launch it:

    mkdir -p ~/dev && cd ~/dev && \
    git clone https://github.com/ShoppinPal/loopback-mongo-sandbox.git && \
    cd ~/dev/loopback-mongo-sandbox && \
    docker-compose run builder npm install && \
    docker-compose up
  3. What did we just do?

    1. Cloned a project.

    2. Installed dependencies.

    3. Finally the docker-compose up command:

      1. launched the app by mounting the local source code and dependencies into a docker container,

      2. and launched MongoDB as its database.

  4. Troubleshooting

    1. If you run into this problem:

       Couldn't connect to Docker daemon at http+docker://localunixsocket - is it running?
      1. try adding your user to the docker group, :

        • sudo usermod -aG docker <username>

      2. if that doesn't do it, then login/logout of the ssh session

      3. ultimately restart your machine and that should definitely do it.

  5. Let's browse to http://<machine-ip>:3000/explorer to see a fully working REST~ful API!

    1. If you had setup a DNS record previously then you can also try: http://<myName-cloud-box-1.domain.com>:3000/explorer to see a fully working REST~ful API!

    2. If all the containers are up and you are still not able to access the application from browser, then make sure you have enabled inbound/outbound security rules on your remote host.

reference