Fork me on GitHub
#off-topic
<
2019-08-31
>
Karol Wójcik09:08:02

I'm trying to implement a parser for org-mode using instaparse. The parser will be available online, it more or less work, but I need some crazy examples of org files you might have and which you use on daily basis. I would highly appreciate if some of you could send me some snippets of your org files using: https://pastebin.com/ in this thread.

danieroux09:08:13

By it's nature my org files are private, and would love to to run your parser on them to see what comes out

Karol Wójcik09:08:02

I'm looking for some real examples of TODO lists. http://README.org is not sufficient ;(. @danie yeah I know therefore if you could anonymize the data it would be perfect.

danieroux10:08:05

I have a 9 year old brain.org.gpg and various gtd.org.gpg-<autosave-date> files, not easy to anonymise 😊

emccue15:08:36

What do people's architecture and deployment pipelines look like?

emccue15:08:18

I've been trying to learn terraform and docker but there is so much that feels either fuzzy or missing

emccue15:08:09

Just the concept of having more than one server feels far fetched

emccue15:08:06

For example, if i wanted to have a support forum for my company

emccue15:08:31

i could write a server that talks to a database and does all the mechanical things for serving data

emccue15:08:50

but if i wanted to add a searchbar and something like https://github.com/valeriansaliou/sonic

emccue15:08:56

ive immediately hit a wall

emccue15:08:44

i can wrap it up in a docker container with about a week of headache

emccue15:08:55

and i know that stuff like docker compose and kubernetes exist

emccue15:08:30

but the moment this thing requires its own database i am lost

emccue15:08:53

i know for an application i write it makes more sense to use a managed database like AWS provides

emccue15:08:37

maybe i hardcode that db's url or shove it through some environment variables with terraform

emccue15:08:27

hacky but def. something i can do

emccue15:08:51

but on my local machine, how do i test this junk?

lispyclouds15:08:55

Hey @emccue I can help! So if I understand correctly there is one service and its database right?

emccue15:08:05

(I have maybe an hour more of emotionally driven rants about my ignorance - but thats a good place to stop)

emccue15:08:42

well in this hypothetical there is one service with a db and i want to call another service which also might have a database

emccue15:08:58

and in this scenario i don't own the code to the second service

emccue16:08:52

and deployment target would be aws i guess

lispyclouds16:08:46

so an relatively simple way to do it is package the service up in docker and deploy it along with the DB container. I can help more with the docker stuff if i can see the code or a bit more details are provided

lispyclouds16:08:23

discuss it here in a thread? @emccue

lispyclouds16:08:22

details like what the language the service is in, whats the db, the exposed ports etc would be helpful 🙂

emccue16:08:48

im just kinda riffing so there isn't a real thing - Just wanted to make that clear.

emccue16:08:19

If you are willing to follow down the rabbit hole a bit i can make a leiningen project that works locally. There is already a docker image for the example service here valeriansaliou/sonic:v1.2.2

lispyclouds16:08:12

right so this is the DB and i assume youre trying to write a server (with UI) for the search and input/output?

lispyclouds16:08:43

one way could be, as you rightly said, read the DB url from the environment variable in the code.

lispyclouds16:08:26

and secondly you need to package your app into a docker image

emccue16:08:24

yeah so the full spec would be

my_app -> db
   |
   v
some_opensource_app -> its db

emccue16:08:21

and i would want to be able to have all of it or as much of it as possible be declarative

lispyclouds16:08:55

for a quick local test you can try this:

docker run -it --name my-db -p 1491:1491 valeriansaliou/sonic

lispyclouds16:08:12

this should start up a server on port 1491 on your machine

emccue16:08:21

yeah, ive gotten that far

lispyclouds16:08:54

to deploy this a simple way would be to use docker compose

emccue16:08:12

okay so playing that scenario out

lispyclouds16:08:33

this allows you to group all your related services into a single unit

lispyclouds16:08:50

and you can specify the db url to your app here too

emccue16:08:00

i have a dockerfile for my app and one for the service i want to call.

emccue16:08:12

my app has a db thats provisioned through RDS

emccue16:08:27

and the service has a db that we are assuming we are managing through the docker

lispyclouds16:08:29

this is the other app right?

emccue16:08:12

How do i not clear all of my data on the external app when i upgrade

emccue16:08:23

like, lets say version + 0.1.0 comes out

emccue16:08:28

its now 10% faster

emccue16:08:55

cool - how do i upgrade what is running in production without nuking that database

lispyclouds16:08:19

this mounts the data path to the host machine

lispyclouds16:08:36

in the case of AWS it will be an EBS volume

lispyclouds16:08:01

so when the container/machine restarts the data is still there

lispyclouds16:08:56

for a sample docker compose file tying multiple services together you can check out: https://github.com/bob-cd/bob/blob/master/docker-compose.yaml

lispyclouds16:08:41

you can just say docker-compose up bob and the whole cluster is up

emccue16:08:31

okay ill take some time to dig into that

emccue16:08:45

i hope one day devops isnt a nightmare

lispyclouds16:08:16

it shouldn't be, its literally my career to bridge the gap between dev and ops 😄

lispyclouds16:08:53

for volume mou nts on compose check out the volumes section in: https://docs.docker.com/compose/compose-file/

lispyclouds16:08:12

I'd recommend not to go down the bigger rabbit hole of Kubernetes yet, its only when you need scale. its better to be avoided for simple cases

lispyclouds16:08:45

feel free to PM me for any issues! Happy to help 😄

lispyclouds16:08:46

once you are able to bring your cluster up via docker-compose locally, the same can be done on an EC2 AWS instance

Denis G21:08:50

what are going to be the new goodies in Clojure 1.11?

seancorfield22:08:05

Lots of Spec stuff (and maybe Spec 2?). Serialized Vars. Lighter weight namespace aliases for keywords. (all subject to change etc etc usual disclaimer)