The most effective way to Setup your machine to use Elixir
Tags: elixir, programing, beam, phoenix
Published: 2022-08-19 12:52:00

# Greeting

Hello #devElixir!!! Welcome to #FullStackElxpro

Here we discuss strategies and tips for your Elixir learning journey, from scratch to a hero Elixir developer.

I am Gustavo, and today&amp;#39;s theme is \*\*Setup your local machine to use Elixir\*\*.

**Do you want to learn Elixir in three months? https://elxpro.com/sell**

_ps: You can follow the Article with **a VIDEO**_

_Want to learn more about Elixir on a Telegram channel?_

https://elxpro.com/subscribe-elxcrew





# Why is it essential to set up your machine to use Elixir?

Having the tools on time will help you be more productive and performant.

And in addition to letting you perform faster, it will be simple and fast when you have everything you need to develop with Elixir.

# Do you remember when it was necessary for your career?

For most of the projects I worked on, I noticed how arduous it was to set up my local machine to work with the right tools. When I decided to work with Elixir, I mapped all essential tools to work in multiple scenarios. I got lucky because this setup was always a success. Why do I want to share it with you?  To make your life as an Elixir engineer easier.


# Let`s start

## Tools

**Zsh**

- Zsh is a nice tool to use in your terminal

`brew install zsh zsh-completions`


**[Curl](https://formulae.brew.sh/formula/curl)**: Sometimes to, test HTTP requests is very usefull

**[Firacode](https://github.com/tonsky/FiraCode/wiki/Installing)**: This font is easier to read for a developer.
- After installing, I highly recommend setting up your terminal with this font.


**[OhMyZsh](https://ohmyz.sh/)**: Nice tool to make your terminal awesome for a developer

**[Elixir](https://elixir-lang.org/install.html)**: The most important tool. Elixir lang 

**[Phoenix](https://hexdocs.pm/phoenix/installation.html)**: The most important framework. Phoenix to create Web Elixir projects.

**[GIT](https://git-scm.com/download/mac)**: Essential to control version code

###  **[Docker](https://docs.docker.com/engine/install/ubuntu/)**: 

This is one of the most essential tools for a new-age developer. Docker makes our life easier to simulate environments, build our own image projects, and install databases and tools for the developers without dirtying our computers.


**Redis**
- When I need to use Redis in a project, I install it using docker.
**Mongo**

- When I need to use Mongo in a project, I install it using docker.

**Kafka**

- When I need to use Kafka in a project, I install it using docker. I always use the script below, and it work really well 


https://gist.github.com/theguuholi/f33b000d6aa1ee83b4d403574969e4a2



**Postgres**

Postgres is an essential Database for those who work with Elixir. And The script below that I provided for you is a way to install the Postgres database easily and fast to start without your need to make any extra configurations in your local machine.

```docker network create pg --driver bridge```

```docker run --name pg --network=pg -e "POSTGRES_PASSWORD=postgres" -p 5432:5432 -v $HOME/docker/volumes/postgres:/var/lib/postgresql/data -d postgres:13.4```


**[Gigalixir](https://gigalixir.readthedocs.io/en/latest/getting-started-guide.html#install-the-command-line-interface)**

- A very nice tool to deploy Elixir application and cheap. 

**Docker-compose**:  Most of the time, when you install Docker, the tool gives you docker-compose

**[Kubernetes](https://kubernetes.io/docs/setup/production-environment/container-runtimes/
)**:  Most of the time, when you install Docker, the tool gives you kubernetes


**[K9s](https://k9scli.io/topics/install/)**: Kubernetes CLI To Manage Your Clusters In Style!

**[kubectx](https://formulae.brew.sh/formula/kubectx
)**: Tool to change kubernetes clusters easily


**[kubernetes-cli](https://kubernetes.io/docs/tasks/tools/install-kubectl-macos/#install-with-homebrew-on-macos)**: Tool to execute commands in kubernetes. 

...kubectl..... get, apply... pods, deployments....  


**[Helm](https://helm.sh/docs/intro/install/)**:  
Helm helps you manage Kubernetes applications — Helm Charts help you define, install, and upgrade even the most complex Kubernetes application

**[DBeaver](https://formulae.brew.sh/cask/dbeaver-community)**: Access SQL databases 

**[Conduktor](https://www.conduktor.io/)**:
We take the complexity out of Kafka. We give you the tools you need to troubleshoot, develop, test, and collaborate with confidence.

**[Insomnia](https://docs.insomnia.rest/insomnia/install)**: For me, is one the best HTTP tool, also easier to create a good APIs with REST/GraphQL documentation.

## Cloud SDKs

- Most of companies use one of them. I prefer google cloud :D 

### Google Cloud

**[Google Cloud SDK](https://formulae.brew.sh/cask/google-cloud-sdk)**: Tool to access Google Cloud Services

### Aws

**[Aws-Cli](https://formulae.brew.sh/formula/awscli)**: Tool to access Aws Services

**[Eks-ctl](https://formulae.brew.sh/formula/eksctl)**: Tool to manage Aws kubernetes


## [VSCode](https://code.visualstudio.com/download)

- Beautify
- Color Highlight
- ElixirLS
- ENV
- Git Graph
- Live Share
- Markdown All in One
- Material Icon Theme
- Phoenix Framework 
- PostCSS Language Support
- Tailwind CSS IntelliSense
- Tools for Apache Kafka 

My **settings.json** to VSCode: https://gist.github.com/theguuholi/0a8d3c8ca651f0fe737e10d53415eb20

````
{
    "editor.fontFamily": "Fira Code",
    "editor.fontLigatures": true,
    "emmet.includeLanguages": {
        "html-eex": "html"
    },
    "bracketPairColorizer.consecutivePairColors": [
        [
            "<",
            "</"
        ],
        [
            "<",
            "/>"
        ],
        [
            "Gold",
            "Orchid",
            "LightSkyBlue"
        ],
        "Red"
    ],
    "files.associations": {
        "*.eex": "html-eex",
        "*.leex": "html-eex",
        "*.heex": "html-eex"
    },
    "beautify.language": {
        "js": {
            "type": [
                "javascript",
                "json",
                "jsonc"
            ],
            "filename": [
                ".jshintrc",
                ".jsbeautifyrc"
            ]
        },
        "css": [
            "css",
            "less",
            "scss"
        ],
        "html": [
            "htm",
            "html",
            "html-eex"
        ]
    },
    "[javascript]": {
        "editor.defaultFormatter": "HookyQR.beautify"
    },
    "[html-eex]": {
        "editor.defaultFormatter": "HookyQR.beautify"
    },
    "workbench.iconTheme": "material-icon-theme",
    "explorer.confirmDelete": false,
    "[json]": {
        "editor.defaultFormatter": "HookyQR.beautify"
    },
    "security.workspace.trust.untrustedFiles": "open",
    "explorer.confirmDragAndDrop": false,
    "diffEditor.ignoreTrimWhitespace": false,
    "terminal.integrated.enableMultiLinePasteWarning": false,
    "editor.bracketPairColorization.enabled": true,
    "editor.guides.bracketPairs": "active",
    "editor.codeActionsOnSave": {
    
    },
    "[css]": {
        "editor.defaultFormatter": "HookyQR.beautify"
    }
}
```

## ShortCuts and Zsh

**[Install Z-init:
](https://github.com/zdharma-continuum/zinit)**
```
bash -c "$(curl --fail --show-error --silent --location https://raw.githubusercontent.com/zdharma-continuum/zinit/HEAD/scripts/install.sh)"
```

Plugins Zinit:

```
zinit light zdharma/fast-syntax-highlighting
zinit light zsh-users/zsh-autosuggestions
zinit light zsh-users/zsh-completions
```

zdharma/fast-syntax-highlighting: recognize commands
zsh-users/zsh-autosuggestions: suggest commands.
zsh-users/zsh-completion: add commands




My Zshrc config: 
https://gist.github.com/theguuholi/d5da8b11d100f04290f8ba203f991767





Social networks:

- Gustavo Oliveira - https://www.linkedin.com/in/gustavo-oliveira-642b23aa/
- Elxpro Linkedin - https://www.linkedin.com/company/36977430
- Twitter - https://twitter.com/elx_pro
- ElxproBr - https://www.youtube.com/channel/UCl_BBK2sXZzQy_3ziNU7-XA
- Elxpro - https://www.youtube.com/channel/UCLzHBFuE6oxPdP6t9iqpGpQ