In GCP Console, create VPC networks named vpn-1 and vpn-2 in us-east1 and europe-west1
In Cloud Shell:
gcloud compute target-vpn-gateways \
create vpn-1 \
OSRM route server is an extremely useful tool for getting the driving distance/time through multiple locations. The route server requires data that has to be downloaded and processsed before it can be used to serve routes from.
Processing OSRM data for large region like North America can be a real challenge due to memory and disk size requirements. It's also really time consuming. If you cut and try from scratch, you will repeatedly run into some constraints and fail after hours of running.
The following are summary notes from trying this with eventual success.
This note is for setting up rapid prototyping of MongoDB -> Kafka -> Spark Streaming pipeline.
Pyspark is being used for fast turn around. Pyspark uses Kafka connector that uses ZooKeeper so the topic has to be created with offsets stored in ZooKeeper.
$> brew install zookeeper kafka apache-spark jupyter
Notes from Qwiklabs: Optimizing networks on GCP
Creating VPC tunnels manually. This is not how you connect VPC's in GCP, but this shows what all the pieces are.
gcloud compute networks create cloud —subnet-mode custom
gcloud compute firewall-rules create cloud-fw —network cloud —allow tcp:22,tcp:5001,udp:5001,icmp
Notes for using Particle.io Boron IoT via USB.
Flashing OTA has been a major paint for me as Boron 2G/3G can take forever before connecting to network. During development, it is best to use USB instead of Cell connection to Flash code.
brew install dfu-util
import org.mongodb.scala.bson.collection.mutable.Document | |
import org.mongodb.scala.{MongoClient, MongoCollection, MongoDatabase} | |
import org.mongodb.scala.model.Aggregates._ | |
import org.mongodb.scala.model.Accumulators._ | |
import com.profuzio.MongoHelper._ | |
val mongoClient: MongoClient = MongoClient.apply("mongodb://localhost") | |
val database: MongoDatabase = mongoClient.getDatabase("kiwanda") | |
val collection: MongoCollection[Document] = database.getCollection("labor") |
sudo systemctl mask sleep.target suspend.target hibernate.target hybrid-sleep.target | |
sudo systemctl set-default multi-user.target |