Advertisement
Guest User

Untitled

a guest
Aug 10th, 2017
493
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 5.52 KB | None | 0 0
  1. // setting up vm
  2.  
  3. -- ubuntu 16, 20gb standard disk
  4. -- added private key pair from my host machine
  5. -- setup static IP for machine
  6. -- unselected delete boot disk on deletion
  7. -- allow http and https traffic
  8.  
  9. // setting up dns
  10.  
  11. -- See image /dns-settings.png
  12.  
  13. // setting up docker, docker-compose, docker-cleanup (remove untagged containers and images) (https://gist.github.com/wdullaer/f1af16bd7e970389bad3)
  14.  
  15. -- wget -qO- https://get.docker.com/ | sh
  16. -- sudo usermod -aG docker john
  17. -- COMPOSE_VERSION=`git ls-remote https://github.com/docker/compose | grep refs/tags | grep -oP "[0-9]+\.[0-9][0-9]+\.[0-9]+$" | tail -n 1`
  18. -- sudo sh -c "curl -L https://github.com/docker/compose/releases/download/${COMPOSE_VERSION}/docker-compose-`uname -s`-`uname -m` > /usr/local/bin/docker-compose"
  19. -- sudo chmod +x /usr/local/bin/docker-compose
  20. -- sudo sh -c "curl -L https://raw.githubusercontent.com/docker/compose/${COMPOSE_VERSION}/contrib/completion/bash/docker-compose > /etc/bash_completion.d/docker-compose"
  21. -- cd /tmp
  22. -- git clone https://gist.github.com/76b450a0c986e576e98b.git
  23. -- cd 76b450a0c986e576e98b
  24. -- sudo mv docker-cleanup /usr/local/bin/docker-cleanup
  25. -- sudo chmod +x /usr/local/bin/docker-cleanup
  26.  
  27. // setting up git ssh
  28.  
  29. -- ssh-keygen -t rsa -b 4096 -C "john@jenca.io"
  30. -- eval "$(ssh-agent -s)"
  31. -- ssh-add ~/.ssh/id_rsa
  32. -- cat .ssh/id_rsa.pub
  33. -- go to github and add ssh key
  34.  
  35. // clone puffin
  36.  
  37. -- git clone --recursive git@github.com:puffinrocks/puffin.git
  38.  
  39. // update docker-compose :1
  40.  
  41. -- cp docker-compose-example.yml compose-production.yml
  42.  
  43. puffin:
  44. - build: .
  45. - SERVER_NAME=bimcontainer.com
  46. - VIRTUAL_HOST=bimcontainer.com
  47. - SECRET_KEY=loloolool
  48.  
  49. (tbc) :2 - setup email. dns-settings-gcp.png (Issue)
  50.  
  51. - MAIL_SUPPRESS_SEND=False
  52. - MAIL_SERVER=smtp.mailgun.org
  53. - MAIL_PORT=2525
  54. - MAIL_USERNAME=postmaster@mail.jenca.io
  55. - MAIL_PASSWORD=93cec017799c33ddaf9cd56daae
  56. - MAIL_DEFAULT_SENDER=john@jenca.io
  57. - MAIL_USE_TLS=True
  58. - MAIL_USE_SSL=False
  59.  
  60. note:
  61. puffindb: (This was in my old version but not in his new version)
  62. volumes: ./postgresData:/var/lib/postgresql/data
  63.  
  64.  
  65. // HTTPS
  66. "either buy a certificate or use letsencrypt" - puffinman
  67.  
  68. // Replacing puffin stuff -> https://github.com/puffinrocks/puffin/compare/master...jencahq:master
  69. update css to reflect updates
  70. - second part of puffin/templates/base.html not updated
  71. - place to reference jencahq - puffin/templates/macros.html
  72.  
  73. - replace puffin/static/images logo.png (20 height) /BIMCONTAINER/bimcontainer-logos/bimwhite-john.png
  74. - update puffin/static/favicon.png (16*16) /BIMCONTAINER/bimcontainer-logos/bcgreen16x16.png
  75. - comment out static/images/puffin-scaled.jpg in templates/index.html
  76. - 'created by Jenca' in base.html
  77. - update the add your application link.
  78.  
  79. // Adding apps
  80. to add submodules --> git submodule add <URL>
  81. to update existing submodule --> git submodule update --remote (checks out latest version of apps. Updates puffin with latest commit id)
  82. When I run this ^ i get; error: cannot open /home/john/puffin/.git/modules/apps/modules/_backup/FETCH_HEAD: Permission
  83. denied
  84. Unable to fetch in submodule path '_backup'
  85.  
  86.  
  87.  
  88. make changes to app
  89. commit to repository
  90. push to repository
  91. change to puffin directory
  92. run update existing submodule command ^^
  93.  
  94.  
  95. Setting up my own apps/ folder with my own gitsubmodules. I can include the ones that are in it.
  96. - begin with puffin-catalogue, then rm apps via;
  97. $git rm <the_submodule>
  98. $rm -rf .git/modules/<the_submodule>
  99. Note: the .git store for the apps submodule is not in apps/ but in puffin/
  100.  
  101. // unifluxx
  102. Tried to pull from docker-compose but when I tried to sign in, flux gave me 500 saying that it couldnt authenticate me.
  103. when i built it myself, it ran.
  104.  
  105. // contactfluxx
  106. Included env vars in docker-compose. Not sure if required.
  107. readme needs updating
  108. need to include logo.png
  109.  
  110. // speckle
  111. need to refactor code so dont require quotes in compose file
  112. also need to reference https://github.com/puffinrocks/rocketchat/blob/f3199ef505b61b8a4cda8b0e8ada4155f05c3016/docker-compose.yml
  113.  
  114. // 3d-repo
  115. To 'get by' login
  116. it uses an interesting authentication mechanism. It does its user auth by creating users in mongo and using its auth.
  117. $ docker-compose exec mongo mongo -u 3drepo -p 3Fu9Ypofv4GxDUlc41Od --authenticationDatabase admin test
  118. $ use admin
  119. $ db.getUsers()
  120. $ http://localhost:5000/registerVerify?username=<USERNAME>&token=<TOKEN>
  121. where <username> and <token> are the username and token that appear in mongo
  122.  
  123.  
  124. // App directory requirements
  125. -- See docker-compose template
  126. -- Logos must be 200x200 pixels with a transparent background. [link to instruction](http://graphicdesign.stackexchange.com/questions/36520/how-to-m
  127. ake-a-color-transparent-in-gimp)
  128. -- Screenshots of app must be 1011 x 697 and 435*300
  129. -- Suggested format
  130. App Name
  131. _Very short description here_
  132. [http://yourinfopage.com](yourinfopage)
  133. Long description here
  134. Other information
  135. [![](screenshots/YourScreenshotSmall-435*300.png)](screenshots/YourScreenshotEnlarged-1011*697.png)
  136.  
  137. // Resizing host disk
  138. Use fdisk to first delete the partition (the idea is that the data on disk will be preserved), then carefully recreate it with a larger size at the same position.
  139.  
  140. $ df -h
  141. $ sudo cfdisk /dev/sda
  142. - take note of start
  143. - delete the partition
  144. - create new
  145. - confirm start is the same
  146. - write partition table
  147. - quit
  148. $ sudo partprobe
  149. $ sudo resize2fs /dev/sda1
  150. $ df -h
  151.  
  152. // GCP command for file transfer
  153. gcloud compute --project=jenca-158021 copy-files . johneganireland@jenca-cloud:/home/johneganireland/puffin/apps/
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement