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

Setup box on Azure

PreviousSolutionNextCreate a machine on Azure

Last updated 7 years ago

Setup box on Azure

  1. Login to Azure and

    1. You can use a personal account to do this, or

    2. request access to your company's account, or

    3. ask your company's devops team to do this on your behalf.

  2. After the new machine is ready, make sure:

    1. You know its IP address.

    2. Optionally, we recommend that you map your <machine-ip> to a friendly domain name like <myName-cloud-box-1.domain.com>

      1. If you have a CloudFlare account, use it.

      2. Configure cloudflare for DNS only. Bypass any HTTP related CDN.

      3. This may take some time to take effect and will hopefully be ready for you to use by the time you finish rest of the steps.

  3. Use ssh to login:

    1. either: ssh <username>@<machine-ip>

    2. or: ssh <username>@<myName-cloud-box-1.domain.com>

  4. Install docker-compose on your cloud box. You can copy-paste the following script, which is a multi-line command and it will "just work."

    sudo apt-get update && \
    sudo apt-get --assume-yes install apt-transport-https ca-certificates && \
    sudo apt-key adv --keyserver hkp://ha.pool.sks-keyservers.net:80 --recv-keys 58118E89F3A912897C070ADBF76221572C52609D  && \
    echo "deb https://apt.dockerproject.org/repo ubuntu-xenial main" | sudo tee /etc/apt/sources.list.d/docker.list && \
    sudo apt-get update && \
    sudo apt-get --assume-yes install tree && \
    sudo apt-get --assume-yes install mosh && \
    sudo apt-get --assume-yes install docker-engine && \
    echo "alias deleteContainers='docker rm \$(docker ps -a -q)'" >> ~/.bash_aliases && \
    echo "alias removeImages='docker rmi \$(docker images -f "dangling=true" -q)'" >> ~/.bash_aliases && \
    sudo service docker start && \
    LATEST=$(
    sudo curl -sSI https://github.com/docker/compose/releases/latest |
     tr -d '\r' |
     awk -F'/' '/^Location:/{print $NF}'
    ) && \
    sudo curl -L "https://github.com/docker/compose/releases/download/${LATEST}/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose && \
    sudo chmod +x /usr/local/bin/docker-compose && \
    docker-compose --version
  5. At this point you have a powerful and scalable setup. We will put it to good use as we explore various exercises in this training guide.

create a machine