An all-in-one package with the minimum third-party requirements to get started as quickly as possible with Pokemod Atlas

Overview

Pokemod Atlas All-In-One

An all-in-one package with the minimum third-party requirements to get started as quickly as possible with Pokemod Atlas.

❤️ PULL REQUESTS ARE WELCOME ❤️


This will help you setup the following third party services:

  • RealDeviceMap
  • MariaDB database for RDM
  • PhpMyAdmin for the database
  • RDM Tools (optional, custom dockerized version)

This still requires technical skills in computers and servers. Please, do not ask for support nor open issues about the services themselves.

WARNING!

By default, this package is intended exclusively for testing and local environments.

DO NOT EXPOSE THE DEFAULT SETUP TO THE INTERNET.

If you really want the convenience and use it for production purposes, you need at the very least to perform these steps, but YOU'RE ON YOUR OWN!. You have been warned.


Getting started (Linux/iOS)

  • Install docker and docker-compose.

  • Login to GitHub registry with your GitHub credentials (unfortunately RDM requires a GitHub account, you can create one here):

    docker login docker.pkg.github.com -u USERNAME --password PASSWORD
  • Open a shell (terminal) at the directory you extracted the zip.

  • Run docker-compose up -d. This will download the images and perform the first time initialization setup for each one of the services.

  • If no errors appear, the containers should be running. Open your browser and check localhost:9000 to confirm.

Getting started (Windows)

  • Install Docker Desktop

  • Login to GitHub registry with your GitHub credentials (unfortunately RDM requires a GitHub account, you can create one here):

    • Open up a PowerShell Terminal
      • Press Super+R (Super is the "Windows" key)
      • Type powershell and press OK
      • Log into your GitHub account with the docker command below (Replace USERNAME and PASSWORD with your own)
        docker login docker.pkg.github.com -u USERNAME --password PASSWORD
  • Run docker-compose up -d db in your PowerShell from the Atlas-All-In-One folder (Shift+Right click on empty space of the file explorer)

  • After it is done pulling run docker-compose logs -f in your Powershell terminal.

  • Once you see these two lines on the logs

    atlas-db | 2022-04-30 6:46:02 0 [Note] mariadbd: ready for connections.

    atlas-db | Version: '10.7.3-MariaDB-1:10.7.3+maria~focal' socket: '/run/mysqld/mysqld.sock' port: 3306 mariadb.org binary distribution

    Press CTRL+C to close the logs.

  • Now you may run docker-compose up -d to pull the rest of the files and startup RDM.

  • You need to open up the port 9001 so devices can access it to connect to your Windows Computer. You can do that by opening an elevated command prompt or an elevated Powershell terminal and executing this command

    netsh advfirewall firewall add rule name="TCP Port 9001" dir=in action=allow protocol=TCP localport=9001

Basic RDM Setup

  • To get the first time RDM's Access Token you need to look for it in the logs. Go back to your terminal and run:

    docker logs atlas-rdm
    
  • In between the logs, look for a line like that looks like this:

    [INFO] [MAIN] Use this access-token to create the admin user: ACCESS_TOKEN
    
  • Open localhost:9000 in your browser, and fill all the fields, using the token you got below as the Access Token.

    If the URL doesn't work, try this and this one too for good measure.

  • Make note of the local IP of the machine running RDM. You can use the shortcuts below:

    • Linux:

      ip -o route get to 8.8.8.8 | sed -n 's/.*src \([0-9.]\+\).*/\1/p'
      
    • Windows:

      • Press Super+R (Super is the "Windows" key)
      • Type cmd
      • Type ipconfig and press Enter
      • Look for the line that says IPv4. The IP is right next to it.

Entire Atlas Setup

  • Install the Atlas APK and Pokémon GO in your device.

  • Open Atlas and do the one-time initial setup:

    • RDM URL: http://IP-YOU-GOT-ABOVE:9001 (note this is 9001, not 9000).
    • Auth Bearer: leave empty.
    • Device Name: anything you want.
    • Email: the e-mail you used to register at atlas.pokemod.dev
    • Device auth token: this is the token you initially got after your first login on atlas.pokemod.dev.

    Tip: If you lost your token, you can click Reset Device Token to get a new one, just make sure you save it somewhere safe this time around.

  • That's all. You can now set up RDM and check the device at the Devices Dashboard.

Tip: after the initial setup, any changes to the configs above can be done from atlas.pokemod.dev. It's not necessary to manually change every device one by one.

Tips and Tricks

Default URLs

Checking the current status of the services

Every service is what's called a docker container. You can check the status of running containers with:

$ docker ps

RDM images and database

  • The directory ./data contains the database. You can use this to make a backup of your data or delete it to start from scratch, for example.

  • To get images working in RDM, uncomment the images volume in your docker-compose.yml file.

    • Download any UICONS repository and put it into a folder called images in your Atlas All In One folder
    • Go into the RDM settings and in the box Icon Styles (one per line, Name;Folder) type in whatever you want your icons named followed by the folder it's on ie. UICONS;PkmnHomeIcons/UICONS PkmnHomeIcons is the root folder of the repo and UICONS would be the folder where the index.json is at.
    • After this docker-compose down && docker-compose up -d and your images should start rendering into RDM. Be aware that this takes more storage because of the way RDM handles images is a bit odd.

Starting from scratch and dealing with docker failures

You can cleanup everything, except the data, by stopping and removing the containers like below:

$ docker-compose stop
$ docker-compose rm

Starting the containers again with docker-compose up -d will still use ./data directory and restore everything.

Changes for using a DB on your Localhost outside of Docker

Edit docker-compose.yaml:

  • Change the following: Uncomment this
    extra_hosts:
    - "host.docker.internal:host-gateway"

Comment out/delete this in both rdm and pma

    depends_on:
      - db

Also make sure to comment out or delete all of the below otherwise you will end up creating a database anyway

 db:
    image: mariadb:latest
    command: --character-set-server=utf8mb4 --collation-server=utf8mb4_unicode_ci --default-authentication-plugin=mysql_native_password --binlog-expire-logs-seconds=86400
    container_name: atlas-db
    networks:
      - atlas-network
    ports:
      - 3306:3306
    restart: unless-stopped
    environment:
      MYSQL_ROOT_PASSWORD: pokemodrules
      MYSQL_DATABASE: rdmdb
      MYSQL_USER: rdmuser
      MYSQL_PASSWORD: pokemodrules
    volumes:
      - ./data:/var/lib/mysql
#     - /etc/localtime:/etc/localtime:ro

Your db_host needs to be host.docker.internal not localhost anywhere else you need to enter your DB host in docker always use host.docker.internal

The DB user you are using needs to have host permissions for either % or your docker bridge IP

You can find your docker bridge IP by using

docker inspect -f '{{range.NetworkSettings.Networks}}{{.IPAddress}}{{end}}' container_name_or_id

If you don't know your container name or id you can view all current containers with docker ps

To create a user with % permissions run the following query on your DB

CREATE USER 'USER'@'%' IDENTIFIED BY 'PASSWORD';
GRANT ALL PRIVILEGES ON DB.* TO 'USER'@'%';
FLUSH PRIVILEGES;

Your MySQL/MariaDB conf file needs to have either bind-address = [DOCKERIP] if you are only connecting from Docker to the DB and nothing else(including localhost!) or bind-address = 0.0.0.0 to enable access from any IP (This could open you up to access from any IP on the web so make sure your firewall is correctly configured)

Minimum Changes For Remote Access

  • Edit docker-compose.yaml:

    • Change the following variables accordingly:
      DB_USERNAME: rdmuser
      DB_PASSWORD: pokemodrules
      DB_ROOT_USERNAME: root
      DB_ROOT_PASSWORD: pokemodrules
      [...]
      MYSQL_ROOT_PASSWORD: pokemodrules
      MYSQL_DATABASE: rdmdb
      MYSQL_USER: rdmuser
      MYSQL_PASSWORD: pokemodrules
    • Delete the following lines, (if you keep them, your database will be accesible by everyone with the URL).
      PMA_USER: root
      PMA_PASSWORD: pokemodrules
  • (RDM-Tools Only) Edit tools/config/config.php and change the lines below accordingly:

    define('DB_USER', getenv("DB_USER") ?: "root");
    define('DB_PSWD', getenv("DB_PSWD") ?: "pokemodrules");
    define('DB_NAME', getenv("DB_NAME") ?: "rdmdb");
  • Browse to your router's IP and use the power of Google to find out how do you forward the ports using NAT for your router's brand:

    MyRouterBrand MyRouterModel "Port Forwarding"|NAT
    

    You need to expose the ports 9000 and 9001 (and 9100 if you want RDM-tools to be accesible from outside)

You might also like...
VoteSwiper helps citizens to find a political party that matches their own views in a playful way.

VoteSwiper / WahlSwiper - Website VoteSwiper (in Germany better known as WahlSwiper) is a cross-platform voting advice app for Android, iOS and web br

Revived of weareblahs/unifi-tv. Watch free channels by unifi TV on any 3rd party IPTV players that support MPEG-DASH + Widevine!

unifi-tv-revived Revived of weareblahs/unifi-tv. Watch free channels by unifi TV on any 3rd party IPTV players that support MPEG-DASH + Widevine! What

A first party module to integrate Elastic App Search in Magento 2.
A first party module to integrate Elastic App Search in Magento 2.

A first-party Magento integration for building excellent, relevant search experiences with Elastic App Search. ⚠️ This is a beta version of the client

Execute time consuming tasks as late as possible in a request

Procrastinator for PHP: do stuff later A few classes to help you executing complicated tasks (like sending mails) later. Example using fastcgi_finish_

Deploying K3s to hetzner in the most ridiculous way possible: KISS

Deploying K3s to hetzner in the most ridiculous way possible: Keep it simply stupid. WTF is this? After experimenting with a few managed k8s installat

Admidio is a free open source user management system for websites of organizations and groups. The system has a flexible role model so that it’s possible to reflect the structure and permissions of your organization.
Admidio is a free open source user management system for websites of organizations and groups. The system has a flexible role model so that it’s possible to reflect the structure and permissions of your organization.

Admidio Admidio is a free open source user management system for websites of organizations and groups. The system has a flexible role model so that it

This extensions makes it possible to modify the TCA of container children elements

This extensions makes it possible to modify the TCA of container children elements

Application with SQL Injection vulnerability and possible privilege escalation
Application with SQL Injection vulnerability and possible privilege escalation

Application with SQL Injection vulnerability and possible privilege escalation. Free vulnerable app for ethical hacking / penetration testing training.

All in one Video Downloader - Download videos from facebook twitter youtube tiktok and 1000+ other sites .. made by Vijay Kumar

VKRdownloader Video Downloader by @TherealVKR Vijay Kumar .... Download Video From YouTube , Facebook , Twitter , Instagram , TikTok , And 1000+ Other

Comments
  • Update dockerfile and readme to include info for connecting to DB on localhost but outside of Docker

    Update dockerfile and readme to include info for connecting to DB on localhost but outside of Docker

    Updated dockerfile to include

    #    extra_hosts:
    #    - "host.docker.internal:host-gateway"
    

    commented out by default

    Updated readme to show all information on what to do including getting docker IP if needed and query for creating user with the correct privileges

    opened by lewymd 2
  • Parameter --init-file /data/application/init.sql makes docker-compose fail on a fresh start.

    Parameter --init-file /data/application/init.sql makes docker-compose fail on a fresh start.

    https://github.com/The-Pokemod-Group/Atlas-All-In-One/blob/99e66fde3b653f2dc5dfea9da71eb69d9265dfc8/docker-compose.yml#L66

    On a fresh start the file /data/application/init.sql does not exists. This leads an aborted atlas-db container creation.

    opened by dynux90 1
  • RDM master updated

    RDM master updated

    https://github.com/The-Pokemod-Group/Atlas-All-In-One/blob/1d3d5dbf41be6d6d990aa06eaab227eb64820de5/README.md?plain=1#L111

    RDM master uses now UIcons (merged today from development branch), image generation of 20 GB is not happening anymore.

    related PR: https://github.com/RealDeviceMap/RealDeviceMap/pull/285

    wiki: https://github.com/RealDeviceMap/RealDeviceMap/wiki/3.-Map-Images

    opened by Fabio1988 1
  • UIcons in RDM are better then old system

    UIcons in RDM are better then old system

    https://github.com/The-Pokemod-Group/Atlas-All-In-One/blob/c526b8af6b75a3f0f032315ac922bdf2d192b091/README.md?plain=1#L132

    RDM does not generate as much images than in the past, so the generated images should not be that much as in the past

    opened by Fabio1988 0
Owner
Pokemod
Pokemod
Magento 2 Extension to cleanup admin menu and Store > Configuration area by arranging third party extension items.

Clean Admin Menu - Magento 2 Extension It will merge all 3rd party extension's menu items in backend's primary menu to a common menu item named "Exten

RedChamps 109 Jan 3, 2023
Helper script to aid upgrading magento 2 websites by detecting overrides. Now supports third party module detections

ampersand-magento2-upgrade-patch-helper Helper scripts to aid upgrading magento 2 websites, or when upgrading a magento module This tool looks for fil

Ampersand 242 Dec 18, 2022
A helpful Laravel package to help me get started in Laravel projects quicker.

Launchpad A helpful Laravel package to help me get started in Laravel projects quicker. This is still a work in progress, so use at your own risk! CLI

Steve McDougall 13 Jun 15, 2023
ATVController for android devices running with RDM > POGO > ATLAS. Quick, simple and dirty add controls with a GUI view

ATVController - WIP - Much to add and fix. ATVController for android devices running with RDM > POGO > ATLAS. Quick, simple and dirty adb controls wit

null 7 Nov 21, 2022
The easiest way to get started with event sourcing in Laravel

Event sourcing for Artisans ?? This package aims to be the entry point to get started with event sourcing in Laravel. It can help you with setting up

Spatie 591 Jan 4, 2023
Nextcloud AIO stands for Nextcloud All In One and provides easy deployment and maintenance with most features included in this one Nextcloud instance.

Nextcloud All In One Beta This is beta software and not production ready. But feel free to use it at your own risk! We expect there to be rough edges

Nextcloud 1.1k Jan 4, 2023
Contracts for Rule Doc Generator. Useful for production code with minimum dependencies.

Rule Doc Generator Contracts Contracts for Rule Doc Generator. Useful for production code with minimum dependencies. Install composer require symplify

null 19 Dec 22, 2022
UMySQL is an extremely simple PHP library for communicating with MySQL databases with ease while keeping overhead to a bare minimum.

Uncomplicated MySQL UMySQL is an extremely simple PHP library for communicating with MySQL databases with ease while keeping overhead to a bare minimu

José Miguel Moreno 4 Oct 24, 2022
This package is used to validate the telephone numbers of the countries taken into account. It also makes it possible to verify that a number is indeed a number of an operator X

phone-number-checker This package is used to validate the telephone numbers of the countries taken into account. It also makes it possible to verify t

faso-dev 4 Feb 7, 2022
Pimcore Bundle that enbable pimcore to expose webook for communication to third parties

WebHookBundle Plugin This extention provide an easy way to send dataobjects to an external sites via json, whenever a pimcore event occurs on a specif

Sintra  - Digital Business 22 Aug 9, 2022