Skip to content

Instantly share code, notes, and snippets.

View wbuchwalter's full-sized avatar
🦙

William Buchwalter wbuchwalter

🦙
View GitHub Profile
//webpack.base.config.js
//----------------------------
module.exports = {
entry: {
app: ['./index.html'],
vendor: [
"angular",
"lodash"
]
export default class NgReduxFake {
private selectedState: any;
private target: any;
private mapState: Function;
push(selectedState: any) {
if (!_.isPlainObject(selectedState)) {
throw 'selectedState must be a plain object';
}
import {INgRedux} from 'ng-redux';
export default class NgReduxStub implements INgRedux {
private selectedState: any;
private target: any;
private mapState: (state: any) => Object;
push(selectedState: any) {
if (!_.isPlainObject(selectedState)) {
throw 'selectedState must be a plain object';

Deployment

For full deployments, you can deploy the PartsUnlimited app to slots as needed. The website is setup to keep the connection strings with the slots. This means that if staging and main website slots are switched, the main website will still use the production database, while the staging slot will keep pointing to the staging database.

Note: If you follow the Continuous Deployment with VSTS Release Management HOL, it will automatically deploy this solution for you using VSTS.

How to Manually Deploy Full Environment And Publish Website

  1. Open PartsUnlimited.sln at the root of the directory
  2. If you haven’t already done so, install PowerShell Tools for Visual Studio by following these steps:
    • Go to Tools - Extensions and Updates and search for "PowerShell" PowerShell Tools for Visual Studio
image: docker:git
services:
- docker:dind
variables:
IMAGE_NAME: "something/app"
IMAGE_URL: "something/repo"
before_script:
# install ssh-agent
- 'which ssh-agent || ( apt-get update -y && apt-get install openssh-client -y )'
{
"id": "/nginx3",
"cmd": null,
"cpus": 0.0625,
"mem": 128,
"disk": 64,
"container": {
"type": "DOCKER",
"volumes": [],
"docker": {
#!/bin/bash
#Install Driver and nvidia-docker
sudo apt-get install -qq linux-headers-`uname -r`
sudo chmod +x /tools/NVIDIA-Linux-x86_64-375.20.run
sudo sh /tools/NVIDIA-Linux-x86_64-375.20.run -a -s
sudo dpkg -i /tools/nvidia-docker_1.0.0.rc.3-1_amd64.deb
#Get sources and build a docker image
cd /home/agent
{
"$schema":"https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
"contentVersion":"1.0.0.0",
"parameters":{
"adminUserName":{
"defaultValue":"agent",
"type":"string"
},
"adminPassword":{
"defaultValue": "Bistro12345",
+ /var/lib/waagent/Microsoft.Azure.Extensions.CustomScript-2.0.2/bin/custom-script-extension install
time=2016-12-12T10:06:50Z version=v2.0.2/git@494f22e-clean operation=install seq=0 event=start
time=2016-12-12T10:06:50Z version=v2.0.2/git@494f22e-clean operation=install seq=0 status="not reported for operation (by design)"
time=2016-12-12T10:06:50Z version=v2.0.2/git@494f22e-clean operation=install seq=0 event="created data dir" path=/var/lib/waagent/custom-script
time=2016-12-12T10:06:50Z version=v2.0.2/git@494f22e-clean operation=install seq=0 event=installed
time=2016-12-12T10:06:50Z version=v2.0.2/git@494f22e-clean operation=install seq=0 status="not reported for operation (by design)"
time=2016-12-12T10:06:50Z version=v2.0.2/git@494f22e-clean operation=install seq=0 event=end
Writing a placeholder status file indicating progress before forking: /var/lib/waagent/Microsoft.Azure.Extensions.CustomScript-2.0.2/status/0.status
+ nohup /var/lib/waagent/Microsoft.Azure.Extensions.CustomScript-2.0.2/bin/custom
2016/12/06 22:47:49.340709 INFO resolvconf is enabled; leaving /etc/resolv.conf intact
2016/12/12 10:05:19.564304 INFO Azure Linux Agent Version:2.1.3
2016/12/12 10:05:19.590345 INFO OS: ubuntu 16.04
2016/12/12 10:05:19.594004 INFO Python: 3.5.2
2016/12/12 10:05:19.597233 INFO Run daemon
2016/12/12 10:05:19.600376 INFO run Ubuntu provision handler
2016/12/12 10:05:19.603870 INFO Waiting cloud-init to copy ovf-env.xml.
2016/12/12 10:05:19.609487 INFO Detect protocol endpoints
2016/12/12 10:05:19.613121 INFO WireServer endpoint is not found. Rerun dhcp handler
2016/12/12 10:05:19.617648 INFO Send dhcp request