Showing posts with label cloud. Show all posts
Showing posts with label cloud. Show all posts

Monday, March 25, 2019

Azure Cloud, an annoying mess of random errors & warnings

Context: We recently moved to Azure from AWS. We did this for business reasons. It's been about 2 months since we moved.

This would have not been a big deal if Azure wasn't a buggy P.O.S mess.

A few examples:

1. Random errors when completing a merge request. What the fuck is Status Code 0: error error?

Status code 0: error error? #WTF
2. You use Git flow? Well MS says 'fuck you'. You can't complete Pull Request from the command line. Doing a git flow feature finish from a CLI, Azure will mark your PR as abandoned unlike the other services. AND THEY EVEN HAVE THE BALLS TO CALL IT A FEATURE!! F!*@*#!@#(*!!!!

3. Random Status code: 200 errors when using the Azure CLI to do stuff. But when you do the same thing with the SLOW AS ASS web app console, no error. If you're a devops guys, do you feel safe?

4. RESOLVING MERGE CONFLICTS IS ASS BACKWARDS!! If a PR will be marked as conflict, you have to pull the PR branch and attempt local merge to see the conflict. You will not find the conflicts in the File viewer.  WHAT. THE. FUCK.

The take away is unless the cost savings is significant, really significant, move to Azure otherwise don't. Personally, I'd rather pour gasoline over my laptop and setting it on fire rather than use Azure for my projects EVEN IT WAS FREE.

Azure Cloud, an annoying mess of random errors & warning and things not working as expected.


Edit. Ironically, the day when I put up this post, I ran into #4.

Tuesday, August 30, 2016

Python zipfiles with the cloud is technologic

Working with zip files in Python is straight forward.

Write it

s3connection = self.get_s3_connection()
bucket = s3connection.get_bucket(aws_bucket_name)
k = Key(bucket)
k.key = key.name

k.get_contents_to_filename(file_path)

Cut it, Paste it, Save it

import shutil
shutil.copyfile(self.src_zipfile, self.temp_zipfile)

Load it

zf = zipfile.ZipFile(zip_file)   # turn file into a zipfile object
zf.extractall(path=unpack_path)  # extract all files to path
files = glob.glob(os.path.join(unpack_path, 'list_*.txt'))  #glob glob
for files in files:
    # to stuff to the files here

Check it

# In a test case
zf = zipfile.ZipFile(zip_file)
zf.extractall(path=unpack_path)
files = glob.glob(os.path.join(unpack_path, 'list_*.txt'))
self.assert(len(files),expected_file_count)


Quick - rewrite it

with open(some_file, 'r+') as file:
    #do file rewrite here
    file.seek(0)
    file.write('Quick!')
    file.truncate()

Now here's daftfunk - technologic

Friday, November 7, 2014

All up in the clouds

I haven't posted in a long while because I've been busy moving into a new place. Things have settled a bit and I'm starting to write again. This time I'm talking about the two cloud services I've been using: Google App Engine(GAE) and DigitalOcean(DO).

GAE is a platform. Think of folder where you put files and have a specific API to use to interact with your data store. The data store here is Google's. Of course, you could use other ones external from Google like mongolab if you into the whole NoSQL thing. The upside to this is you don't have to worry about maintaining servers, binaries and such. It makes you focus on your app. The downside though is that the "folder" is a sandbox. You are limited to what the API has.

DO is a VM. Think server. You can start off with a bare bones Linux server - there are Debian and Redhat variants - or if you could start off with a complete configured LAMP server. Either way, you will manage this via an SSH connection. The downside, will you have to manage that VM and if you happen to be a sucky (or worst lazy) administrator you might end up screwing up a lot. The upside is you have full control.