Skip to content

Commit

Permalink
Create test dev environment
Browse files Browse the repository at this point in the history
  • Loading branch information
Ichbinjoe committed Dec 21, 2018
1 parent 98dfc34 commit 8cc93da
Show file tree
Hide file tree
Showing 40 changed files with 1,262 additions and 1 deletion.
1 change: 1 addition & 0 deletions dev/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
resources/
22 changes: 22 additions & 0 deletions dev/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@

.PHONY: clean, all, run

all : resources/paper.jar resources/proxy.jar

resources :
mkdir resources

resources/paper.jar : resources
wget -O resources/paper.jar https://papermc.io/ci/job/Paper-1.13/lastSuccessfulBuild/artifact/paperclip.jar

resources/proxy.jar : resources
wget -O resources/proxy.jar https://papermc.io/ci/job/Waterfall/lastSuccessfulBuild/artifact/Waterfall-Proxy/bootstrap/target/Waterfall.jar

clean :
rm -r resources/

run :
tmux new-session './proxy/run.sh' \; \
split-window -h './s1/run.sh' \; \
split-window -h './s2/run.sh' \; \
select-layout even-horizontal
26 changes: 26 additions & 0 deletions dev/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
## Using this testbed

This testbed runs one Bungeecord as well as two Paper servers behind it, labeled
s1 and s2. Ports for where everything is bound is listed below.

First, download required sources using the following command:

```
make
```

Then, each time you want to launch a session, run:

```
make run
```

FYI, this only works in Linux afaik because thats what I do my development on.

# Ports

| Server | MC Port | Votifier Port |
| ------ | ------- | ------------- |
| proxy | 25577 | 8192 |
| s1 | 25565 | 8193 |
| s2 | 25566 | 8194 |
4 changes: 4 additions & 0 deletions dev/proxy/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
logs/
modules/
locations.yml

48 changes: 48 additions & 0 deletions dev/proxy/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
forge_support: true
timeout: 30000
online_mode: true
log_commands: false
listeners:
- query_port: 25577
motd: '&4its a bungee cord surbur'
tab_list: GLOBAL_PING
query_enabled: false
proxy_protocol: false
forced_hosts: {}
ping_passthrough: false
priorities:
- s1
bind_local_address: true
host: 0.0.0.0:25577
max_players: 1
tab_size: 60
force_default_server: false
connection_throttle: 1
groups:
md_5:
- admin
log_pings: true
ip_forward: true
prevent_proxy_connections: true
network_compression_threshold: 256
disabled_commands: []
stats: bf8a54ea-2917-4b9e-b463-2c05bd7f1ac6
permissions:
default:
- bungeecord.command.server
- bungeecord.command.list
admin:
- bungeecord.command.alert
- bungeecord.command.end
- bungeecord.command.ip
- bungeecord.command.reload
servers:
s1:
motd: SERVER 1
address: localhost:25565
restricted: false
s2:
motd: SERVER 2
address: localhost:25566
restricted: false
player_limit: -1
8 changes: 8 additions & 0 deletions dev/proxy/modules.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
version: 2
modules:
- jenkins://cmd_alert
- jenkins://cmd_find
- jenkins://cmd_list
- jenkins://cmd_send
- jenkins://cmd_server
- jenkins://reconnect_yaml
1 change: 1 addition & 0 deletions dev/proxy/plugins/NuVotifier/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
rsa/
74 changes: 74 additions & 0 deletions dev/proxy/plugins/NuVotifier/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
# The IP to listen to. Use 0.0.0.0 if you wish to listen to all interfaces on your server. (All IP addresses)
# This defaults to the IP you have configured your server to listen on, or 0.0.0.0 if you have not configured this.
host: 0.0.0.0

# Port to listen for new votes on
port: 8192

# Whether or not to print debug messages. In a production system, this should be set to false.
# This is useful when initially setting up NuVotifier to ensure votes are being delivered.
debug: false

# All tokens, labeled by the serviceName of each server list.
tokens:
# Default token for all server lists, if another isn't supplied.
default: jqpli3gnd8l67qsg2d81vje09h

# Setting this option to true will disable handling of Protocol v1 packets. While the old protocol is not secure, this
# option is currently not recommended as most voting sites only support the old protocol at present.
disable-v1-protocol: false

# Configuration section for all vote forwarding to NuVotifier
forwarding:
# Sets whether to set up a remote method for fowarding. Supported methods:
# - none - Does not set up a forwarding method.
# - pluginMessaging - Sets up plugin messaging.
# - proxy - Proxies votes to other NuVotifier servers from this server.
method: none
pluginMessaging:
channel: nuvotifier:votes

#Only send votes to certain servers. If a server is present on excludedServers, then votes will NOT be forwarded
#to them. If excludedServers is not present, votes will be sent to all servers.
# If onlySendToJoinedServer is true and a player is on one of these servers, NuVotifier will process the vote as if the
# player was not on the network at all.
#excludedServers:
#- server1
#- server2

# If uncommented, turns excludedServers into an includedServers, where only servers on the list will be used.
#whitelist: true

# Sets which cache to use if there are no players on the server that the vote is being sent to. Supported caches:
# - none - Votes will simply be lost when no players are present on the server.
# - memory - Votes will be cached in memory when no players are present. When Bungee is restarted, the votes will be lost.
# - file - Votes will be saved to a local file every 3 minutes and on shutdown and reloaded when Bungee is restarted. This is suitable for
# most set ups.
cache: file
# Only sends the vote to the server in which the player is currently joined.
onlySendToJoinedServer: false
#Sets which server to send the vote in the event the player is not online when the vote is cast
#If you do not want the vote forwarded to a fallback, set this value to empty ('')
#ONLY USED IF onlySendToJoinedServer is true!!
joinedServerFallback: 'Hub'
# Defines how quickly to dump votes over a player's connection when offloading a cache in votes per second
dumpRate: 5
# Options for file caching.
file:
name: cached-votes.json
# days before a vote is considered 'dead' - removed from cache with a console warning
cacheTime: 10
# Options for memory caching.
memory:
# days before a vote is considered 'dead' and removed from memory. All votes are removed when the server restarts. -1 signifies no TTL
cacheTime: -1
# Specify servers to proxy votes for.
proxy:
Hub:
address: 127.0.0.1
port: 8193
token: MyKeyHere
Hub2:
address: 127.0.0.1
port: 8194
token: AnotherKeyHere
1 change: 1 addition & 0 deletions dev/proxy/plugins/nuvotifier.jar
1 change: 1 addition & 0 deletions dev/proxy/proxy.jar
6 changes: 6 additions & 0 deletions dev/proxy/run.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#!/bin/sh

DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null && pwd )"
cd $DIR

java -jar proxy.jar
8 changes: 8 additions & 0 deletions dev/proxy/waterfall.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
use_netty_dns_resolver: true
disable_modern_tab_limiter: true
log_initial_handler_connections: true
throttling:
tab_complete: 1000
game_version: ''
log_server_list_ping: false
allow_empty_packets: false
10 changes: 10 additions & 0 deletions dev/s-run.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
#!/bin/sh
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null && pwd )"
cd $DIR
echo <<WARNING
Hey! Just so you know, I am using the IReallyKnowWhatIAmDoingISwear flag, as
well as overriding the eula check. If you don't agree to the Mojang EULA
thingie, then uh, smash your computer or something because you totally agreed
to it so just fyi
WARNING
java -DIReallyKnowWhatIAmDoingISwear -Dcom.mojang.eula.agree=true -jar paper.jar
19 changes: 19 additions & 0 deletions dev/s1/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
banned-ips.json
banned-players.json

cache/

eula.txt

logs/

permissions.yml

ops.json
usercache.json
version_history.json
whitelist.json

world/
world_nether/
world_the_end/
37 changes: 37 additions & 0 deletions dev/s1/bukkit.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
# This is the main configuration file for Bukkit.
# As you can see, there's actually not that much to configure without any plugins.
# For a reference for any variable inside this file, check out the Bukkit Wiki at
# https://www.spigotmc.org/go/bukkit-yml
#
# If you need help on this file, feel free to join us on irc or leave a message
# on the forums asking for advice.
#
# IRC: #spigot @ irc.spi.gt
# (If this means nothing to you, just go to https://www.spigotmc.org/go/irc )
# Forums: https://www.spigotmc.org/
# Bug tracker: https://www.spigotmc.org/go/bugs


settings:
allow-end: true
warn-on-overload: true
permissions-file: permissions.yml
update-folder: update
plugin-profiling: false
connection-throttle: 4000
query-plugins: true
deprecated-verbose: default
shutdown-message: Server closed
spawn-limits:
monsters: 70
animals: 10
water-animals: 15
ambient: 15
chunk-gc:
period-in-ticks: 600
load-threshold: 0
ticks-per:
animal-spawns: 400
monster-spawns: 1
autosave: 6000
aliases: now-in-commands.yml
17 changes: 17 additions & 0 deletions dev/s1/commands.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# This is the commands configuration file for Bukkit.
# For documentation on how to make use of this file, check out the Bukkit Wiki at
# https://www.spigotmc.org/go/commands-yml
#
# If you need help on this file, feel free to join us on irc or leave a message
# on the forums asking for advice.
#
# IRC: #spigot @ irc.spi.gt
# (If this means nothing to you, just go to https://www.spigotmc.org/go/irc )
# Forums: https://www.spigotmc.org/
# Bug tracker: https://www.spigotmc.org/go/bugs

command-block-overrides: []
ignore-vanilla-permissions: false
aliases:
icanhasbukkit:
- version $1-
56 changes: 56 additions & 0 deletions dev/s1/help.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
# This is the help configuration file for Bukkit.
#
# By default you do not need to modify this file. Help topics for all plugin commands are automatically provided by
# or extracted from your installed plugins. You only need to modify this file if you wish to add new help pages to
# your server or override the help pages of existing plugin commands.
#
# This file is divided up into the following parts:
# -- general-topics: lists admin defined help topics
# -- index-topics: lists admin defined index topics
# -- amend-topics: lists topic amendments to apply to existing help topics
# -- ignore-plugins: lists any plugins that should be excluded from help
#
# Examples are given below. When amending command topic, the string <text> will be replaced with the existing value
# in the help topic. Color codes can be used in topic text. The color code character is & followed by 0-F.
# ================================================================
#
# Set this to true to list the individual command help topics in the master help.
# command-topics-in-master-index: true
#
# Each general topic will show up as a separate topic in the help index along with all the plugin command topics.
# general-topics:
# Rules:
# shortText: Rules of the server
# fullText: |
# &61. Be kind to your fellow players.
# &B2. No griefing.
# &D3. No swearing.
# permission: topics.rules
#
# Each index topic will show up as a separate sub-index in the help index along with all the plugin command topics.
# To override the default help index (displayed when the user executes /help), name the index topic "Default".
# index-topics:
# Ban Commands:
# shortText: Player banning commands
# preamble: Moderator - do not abuse these commands
# permission: op
# commands:
# - /ban
# - /ban-ip
# - /banlist
#
# Topic amendments are used to change the content of automatically generated plugin command topics.
# amended-topics:
# /stop:
# shortText: Stops the server cold....in its tracks!
# fullText: <text> - This kills the server.
# permission: you.dont.have
#
# Any plugin in the ignored plugins list will be excluded from help. The name must match the name displayed by
# the /plugins command. Ignore "Bukkit" to remove the standard bukkit commands from the index. Ignore "All"
# to completely disable automatic help topic generation.
# ignore-plugins:
# - PluginNameOne
# - PluginNameTwo
# - PluginNameThree

1 change: 1 addition & 0 deletions dev/s1/paper.jar
Loading

0 comments on commit 8cc93da

Please sign in to comment.