Scuttlebutt: Social Network With Privacy!

Tags: 

Just read a more interesting blog post than this will be.  I recommend you check it out.  Posting here for my reference.

https://staltz.com/an-off-grid-social-network.html

Here's a link directly to the project: https://www.scuttlebutt.nz

I've often thought about this, but there's a huge difference between thinking and doing.  I'm glad there are doers out there!

Can't wait to dig into this.  I'll write a follow up post if I come up with anything interesting to say.

A Web Development Workflow

Tags: 

This is a rough draft of some environment set up to support a 'wunderflow' style branching strategy with deployment from local git commands.

The goal is to develop a code management and deployment workflow that remains the same regardless of the deployment environments from project to project. The environment set up should be the only thing that varies, while the steps in the development and release cycle remain the same.

The Env Setup below illustrates how this might be done on a single server with subdomains, plus additional notes on using MultiDev on https://pantheon.io.

ENV SETUP

GIT REPOS

Create a Bare Repo for Each Env

This will vary for the chosen hosting service. On Pantheon for example, we'd create 'multidev' environments for develop/test and staging/UAT branches, using the main master branch for live. (This bypasses the standard Pantheon workflow. @see Deploying a Release)

Below is an example of how to set up on standard hosting with multiple environments on one host. Configure subdomains on the host for dev.[project].tld, stg.[project].tld, with master deploying to [project].tld. The [devpath]/www, [stgpath]/www are set to the docroot for each subdomain.

mkdir [devpath]/repo.git

cd [devpath]/repo.git

git init --bare

Change the default branch.

git symbolic-ref HEAD refs/heads/develop

Create a post-receive hook that will push to a detached work tree.

cat > hooks/post-receive

#!/bin/sh

GIT_WORK_TREE=~/dev/www git checkout -f

Make the git hook executable.

chmod +x hooks/post-receive

(Repeat this process for stg (stage), prod (master))

Set Up Your Local Remotes

This is primarily for Dev Ops, Lead Devs, or whoever is managing branches for the project. Regular Devs simply checkout from the central repo as origin which defaults to develop branch for merges. They always cut a feature branch from master and push the feature branch to origin for code review.

This deployment process can be automated with CI tools.

For Manual Deployment: Add remotes for each environment repo to your local

git clone [your project repo from central repo management platform]

cd [your project]

git remote add dev [host uri]/[devpath]/repo.git

git checkout develop

git push dev +develop:refs/heads/develop

(I think this might be ok as just git push dev develop)

 

Since Pantheon repos probably originate at pantheon multidevs, set up would entail, first cloning the repo from pantheon, then renaming the remote origin to prod so our master branch matches Pantheon's live branch. Some testing will need to be done to determine the best way to set up the other multidev environments.

git remote mv origin prod

Then setting up our central repo as origin:

git remote add origin [uri]

 

Feature branches are code reviewed and merged on the repo management platform (bitbucket, github, etc). When it's time to deploy code to dev env:

Locally:

git checkout develop

git pull

git push dev

(Repeat for other envs.)

Other deployment tasks can be automated. drush rr, drush updb, etc.

Deploying a Release

During a release cycle, all PRs make their way through Development Testing and then to Staging Testing or UAT. If approved on the staging branch, this code is considered ready for deployment to the production environment.

Each release branch should have a version number [proposed] 8.2.0.0 D.d.f.p (Drupal major version, Drupal minor version, feature release, patch/bug).

In general, in terms of branch management, and the end of a development cycle, all code to be deployed in a release will be present, tested and approved in the branch staging/staging-D.d.f.p. That branch can be merged into master. Master can be tagged with that version number. From there, deployment steps can be executed. These processes are still in development, but a basic manual process could be to simply push the new master to the production environment and run the update script. (drush updb, rr, etc.).

DevOps or Lead Dev

Locally:

git checkout staging/staging-D.d.f.p

git pull

git checkout master

git merge staging/staging-D.d.f.p --no-ff

git tag -a vD.d.f.p -m "Preparing release."

git push prod --tags

Pantheon

We have an extra step when deploying to Pantheon. We need to add an additional tag in the tag step above.

Pantheon's standard workflow doesn't follow our branching strategy. We must use multidev instances on Pantheon for our develop and staging branch testing environments. The standard workflow uses only the master branch with specific tags to indicate which commit to checkout in detached HEAD state for each standard environment. Tags like: pantheon_test_1, pantheon_test_2, pantheon_live_1, etc. (A completely personal opinion, this is a strange way to manage code for environments. I assume they had some reason for doing it this way but they also seem to be adapting to different workflows.)

To deploy our master branch to pantheon, we will skip the dev and test tags because those are managed with separate branches and multidev environments.  We only need to tag our master branch with the next highest pantheon_live_# tag.

The following command will list the tags on the rep, filter them to pantheon_live_ with grep, and show only the highest increment.

git tag | grep pantheon_live_ | sort -k1.15n | tail -1

Once we have the current latest tag, we increment by one and tag our new latest commit on master:

git tag -a vD.d.f.p -m "Preparing release."

git tag -a pantheon_live_# -m "Tagging pantheon live."

git push prod --tags

More info: https://pantheon.io/docs/hotfixes/

REFERENCES:

Trump Ipsum

Tags: 

My text is long and beautiful, as, it has been well documented, are various other parts of my website. Trump Ipsum is calling for a total and complete shutdown of Muslim text entering your website. When other websites give you text, they’re not sending the best. They’re not sending you, they’re sending words that have lots of problems and they’re bringing those problems with us. They’re bringing mistakes. They’re bringing misspellings. They’re typists… And some, I assume, are good words.

All of the words in Lorem Ipsum have flirted with me - consciously or unconsciously. That's to be expected. It’s about making placeholder text great again. That’s what people want, they want placeholder text to be great again. When other websites give you text, they’re not sending the best. They’re not sending you, they’re sending words that have lots of problems and they’re bringing those problems with us. They’re bringing mistakes. They’re bringing misspellings. They’re typists… And some, I assume, are good words.

I'm speaking with myself, number one, because I have a very good brain and I've said a lot of things. The other thing with Lorem Ipsum is that you have to take out its family. All of the words in Lorem Ipsum have flirted with me - consciously or unconsciously. That's to be expected.

It’s about making placeholder text great again. That’s what people want, they want placeholder text to be great again. The best taco bowls are made in Trump Tower Grill. I love Hispanics! When other websites give you text, they’re not sending the best. They’re not sending you, they’re sending words that have lots of problems and they’re bringing those problems with us. They’re bringing mistakes. They’re bringing misspellings. They’re typists… And some, I assume, are good words.

You know, it really doesn’t matter what you write as long as you’ve got a young, and beautiful, piece of text.

http://trumpipsum.net/

The Robot Invasion Has Begun!

Tags: 

The robot invasion has truly begun!

With the advancements in AI, Natural Language Processing, Intelligent Personal Assistants (Siri, Cortana, Google Now), and miniaturized computers, we have a very fertile ground for personal robotics.

By personal robotics I mean a merging of the Intelligent Personal Assistant with consumer level robots.  Electronic appliances that seem alive with intelligence and personality.  The likes of which we've seen in sci-fi for decades.  They're here now, and will begin infiltrating our lives as toys, and Personal Assistants that go beyond our smart phones.  They'll start small and cute, so we, as humans, are comfortable welcoming them into our homes.  As robotics technology and processing power continues to be refined, these robots will become more physically complex.  They'll evolve from things that sit on a counter with limited movement, or small bots that can roll around on wheels, to things with appendages.  They'll go from fun learning toys and "conversational" assistants, to actually being able to lend a helping hand.  I would presume they'll become more humanoid, which won't be weird by that time, because we'll have become comfortable with their cuter and less threatening ancestors. 

Here are two examples of what we have now:

Dash and Dot by Wonder Workshop:  https://www.makewonder.com/

These are essentially learning toys, that get kids excited about programming... without really realizing they're learning to think like programmers.  There's not a lot of "intelligence" built in but they are versatile little robotics platforms that you (or your kids) can program to do almost anything (within their physical capabilities).

Jibo (Coming Soon): https://www.jibo.com/

This is the "smart" one.  Though the hardware platform is a bit limited, the AI in this and the conversational interaction it will bring starts to get something akin to a real life R2-D2, in my opinion.  You can talk to it and it can do things you ask.  It will talk back to you too, and you don't have to understand beeps and whistles.  Intelligent Personal Assistants are going to become more conversational and more capable.  The original Siri developers are on the forefront of that advancement with Viv.  (http://viv.ai/ https://youtu.be/Rblb3sptgpQ)

As a powerful AI like Viv becomes better and more natural to interact with, and robotic platforms become less expensive and more refined, these technologies will converge to bring us insanely advanced "droids" that may take us from R2-D2, to C3PO, to Ava from Ex Machina....  Watch out... you know how that ends.  ;)

--

I'm not really predicting a robotocalypse or anything.  Just want to share a bit of what's here now, and mention that the future will sneak up on you much faster than you expect.

I'm off to buy Dash and Dot to rebuild them as a miniature R2-D2.

--

BONUS VIDEO:  https://youtu.be/QdQL11uWWcI  (ASIMO)

Pages

Subscribe to Front page feed