-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #56 from pwnsky/dev
Dev
- Loading branch information
Showing
63 changed files
with
686 additions
and
805 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,10 @@ | ||
<XML> | ||
<Proxy> | ||
<Plugin Name="core/net" /> | ||
<Plugin Name="core/config" /> | ||
<Plugin Name="core/log" /> | ||
<Plugin Name="core/utils" /> | ||
<Plugin Name="core/node" /> | ||
|
||
<Plugin Name="node/proxy/logic" /> | ||
<Plugin Name="node/proxy/logic" HotReload="true" /> | ||
</Proxy> | ||
</XML> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,11 @@ | ||
# cd {squick_project} | ||
# docker build . -t i0gan/squick_src:1.1 -f ./docker/src | ||
# docker run -d --name squick_src i0gan/squick_src:1.1 | ||
# rm -rf ./cache/docker_deploy | ||
# docker cp squick_src:/squick/deploy ./cache/docker_deploy | ||
|
||
# docker build . -t i0gan/squick:1.1 -f ./docker/release | ||
# docker run -it --name squick i0gan/squick:1.1 | ||
|
||
FROM ubuntu:22.04 | ||
|
||
# Set env | ||
ARG DEBIAN_FRONTEND=noninteractive | ||
RUN apt update && apt install -y dos2unix vim net-tools | ||
|
||
# copy from docker builded files | ||
COPY ./cache/docker_deploy /squick | ||
WORKDIR /squick | ||
RUN chmod +x /squick/script/*.sh | ||
CMD bash /squick/script/squick.sh | ||
CMD bash /squick/script/squick.sh |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
# cd {squick_project} | ||
# docker build . -t i0gan/squick_src:1.1 -f ./docker/src | ||
# docker run -d --name squick_src i0gan/squick_src:1.1 | ||
# rm -rf ./cache/docker_deploy | ||
# docker cp squick_src:/squick/deploy ./cache/docker_deploy | ||
|
||
# docker build . -t i0gan/squick:1.1 -f ./docker/release | ||
# docker run -it --name squick i0gan/squick:1.1 | ||
|
||
FROM ubuntu:22.04 | ||
# Set env | ||
ARG DEBIAN_FRONTEND=noninteractive | ||
|
||
# copy from docker builded files | ||
COPY ./cache/docker_deploy /squick | ||
WORKDIR /squick | ||
RUN chmod +x /squick/script/*.sh | ||
CMD bash /squick/script/squick.sh |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
FROM pwnsky/squick_src:1.1 | ||
|
||
COPY . /squick_dep | ||
|
||
RUN rm -rf /squick_dep/third_party && mv /squick/third_party /squick_dep && rm -rf /squick && mv /squick_dep /squick | ||
|
||
WORKDIR /squick | ||
RUN cd tools && chmod +x *.sh && dos2unix *.sh | ||
RUN cd script && chmod +x *.sh && dos2unix *.sh | ||
|
||
RUN bash ./tools/clean_squick.sh | ||
RUN bash ./tools/build_sqkctl.sh | ||
RUN bash ./tools/build_squick.sh | ||
RUN bash ./tools/generate_deploy.sh | ||
CMD bash /squick/script/squick.sh |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,9 @@ | ||
#! /bin/bash | ||
|
||
namespace="pwnsky" | ||
image="pwnsky" | ||
image="pwnsky/squick:1.1" | ||
|
||
rm -rf k8s_cfg | ||
mkdir -p k8s_cfg | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
--- | ||
apiVersion: apps/v1 | ||
kind: StatefulSet | ||
metadata: | ||
name: backstage | ||
namespace: default | ||
labels: | ||
app: squick | ||
spec: | ||
replicas: 1 | ||
selector: | ||
matchLabels: | ||
app: squick | ||
template: | ||
metadata: | ||
labels: | ||
app: squick | ||
spec: | ||
containers: | ||
- name: squick | ||
image: pwnsky/squick:1.2 | ||
imagePullPolicy: Never | ||
command: ["/bin/bash", "-c"] | ||
args: | ||
- > | ||
/squick/script/squick.sh type=backstage id=`expr 2500 + ${HOSTNAME##*-}` area=0 ip=$(POD_IP) port=10501 ws_port=10502 master_ip=svc-squick-master master_port=10001 logshow=0 | ||
env: | ||
- name: POD_NAME | ||
valueFrom: | ||
fieldRef: | ||
fieldPath: metadata.name | ||
- name: POD_IP | ||
valueFrom: | ||
fieldRef: | ||
fieldPath: status.podIP | ||
- name: POD_NAMESPACE | ||
valueFrom: | ||
fieldRef: | ||
fieldPath: metadata.namespace |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
--- | ||
apiVersion: apps/v1 | ||
kind: StatefulSet | ||
metadata: | ||
name: squick-master | ||
namespace: default | ||
labels: | ||
app: squick | ||
spec: | ||
serviceName: "svc-squick-master" | ||
replicas: 3 | ||
selector: | ||
matchLabels: | ||
app: squick | ||
template: | ||
metadata: | ||
labels: | ||
app: squick | ||
spec: | ||
containers: | ||
- name: squick | ||
image: pwnsky/squick:1.2 | ||
imagePullPolicy: Never | ||
command: ["/bin/bash", "-c"] | ||
args: | ||
- > | ||
/squick/script/squick.sh type=master id=`expr 1 + ${HOSTNAME##*-}` area=0 ip=$(POD_IP) port=10001 http_port=50000 logshow=0 | ||
env: | ||
- name: POD_NAME | ||
valueFrom: | ||
fieldRef: | ||
fieldPath: metadata.name | ||
- name: POD_IP | ||
valueFrom: | ||
fieldRef: | ||
fieldPath: status.podIP | ||
- name: POD_NAMESPACE | ||
valueFrom: | ||
fieldRef: | ||
fieldPath: metadata.namespace | ||
--- | ||
apiVersion: v1 | ||
kind: Service | ||
metadata: | ||
name: svc-squick-master | ||
spec: | ||
selector: | ||
app: squick | ||
ports: | ||
- protocol: TCP | ||
port: 10001 | ||
targetPort: 10001 | ||
type: ClusterIP |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
--- | ||
apiVersion: apps/v1 | ||
kind: StatefulSet | ||
metadata: | ||
name: squick-player | ||
namespace: default | ||
labels: | ||
app: squick | ||
spec: | ||
#serviceName: "svc-squick-proxy" | ||
replicas: 3 | ||
selector: | ||
matchLabels: | ||
app: squick | ||
template: | ||
metadata: | ||
labels: | ||
app: squick | ||
spec: | ||
containers: | ||
- name: squick | ||
image: pwnsky/squick:1.2 | ||
imagePullPolicy: Never | ||
command: ["/bin/bash", "-c"] | ||
args: | ||
- > | ||
/squick/script/squick.sh type=player id=`expr 1000 + ${HOSTNAME##*-}` area=0 ip=$(POD_IP) port=10401 master_ip=svc-squick-master master_port=10001 logshow=0 | ||
env: | ||
- name: POD_NAME | ||
valueFrom: | ||
fieldRef: | ||
fieldPath: metadata.name | ||
- name: POD_IP | ||
valueFrom: | ||
fieldRef: | ||
fieldPath: status.podIP | ||
- name: POD_NAMESPACE | ||
valueFrom: | ||
fieldRef: | ||
fieldPath: metadata.namespace |
Oops, something went wrong.