Skip to content

Commit

Permalink
Merge branch 'main' into proxy-processor
Browse files Browse the repository at this point in the history
Signed-off-by: Haishi2016 <hbai@microsoft.com>
  • Loading branch information
Haishi2016 authored Dec 10, 2024
2 parents b3b7f56 + e83583e commit 8608689
Show file tree
Hide file tree
Showing 471 changed files with 46,549 additions and 3,218 deletions.
2 changes: 1 addition & 1 deletion .github/version/versions.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.48.28
0.48.32
111 changes: 111 additions & 0 deletions .github/workflows/fault.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,111 @@
# This workflow will build a golang project
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-go

name: fault

on:
push:
branches:
- main
- 'release/**'
pull_request:
branches:
- main
- 'release/**'
workflow_dispatch:
env:
ContainerRegistry: "ghcr.io"
ContainerRegistryRepo: "ghcr.io/eclipse-symphony"

jobs:

build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: 1.22.4

- name: Set up custom GOPATH
run: |
mkdir -p /home/runner/go
echo "export GOPATH=/home/runner/go" >> $HOME/.bashrc
echo "export PATH=\$PATH:\$GOPATH/bin" >> $HOME/.bashrc
source $HOME/.bashrc
- name: Install make
run: sudo apt-get update && sudo apt-get install -y build-essential

- name: Check docker version and images
run: docker --version && docker images

- name: Install kubectl
run: |
curl -LO "https://dl.k8s.io/release/$(curl -L -s https://dl.k8s.io/release/stable.txt)/bin/linux/amd64/kubectl"
chmod +x kubectl
sudo mv ./kubectl /usr/local/bin/kubectl
kubectl version --client
kubectl config view
- name: Install Helm
run: |
curl -fsSL -o get_helm.sh https://raw.githubusercontent.com/helm/helm/main/scripts/get-helm-3
chmod 700 get_helm.sh
./get_helm.sh
- name: Install minikube
run: |
curl -Lo minikube https://storage.googleapis.com/minikube/releases/latest/minikube-linux-amd64
chmod +x minikube
sudo mv minikube /usr/local/bin/
minikube start
kubectl config view
- name: Install Mage
run: |
cd ..
git clone https://github.com/magefile/mage
cd mage
go run bootstrap.go
cd ..
- name: Login to Docker Hub
uses: docker/login-action@v3
with:
registry: ${{ env.ContainerRegistry }}
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Build docker images
run: |
cd test/localenv/
mage build:apifault
mage build:k8sfault
mage cluster:up
- name: Go work init
run: |
mv go.work.bk go.work
- name: Run fault tests
run: |
cd test/integration/scenarios/faultTests/ && mage faulttests
- name: Collect and upload symphony logs
uses: actions/upload-artifact@v4
with:
name: symphony-logs
path: |
/tmp/symphony-integration-test-logs/**/*.log
continue-on-error: true
if: always()







5 changes: 4 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,7 @@
piccolo/target

go.work
*.log
*.log

docs-site/node_modules
docs-site/.hugo_build.lock
10 changes: 10 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
[submodule "landing/public"]
path = landing/public
url = git@github.com:eclipse-symphony/symphony-website.git
branch = main
[submodule "docs-site/public"]
path = docs-site/public
url = git@github.com:eclipse-symphony/docs.git
[submodule "docs-site/themes/docsy"]
path = docs-site/themes/docsy
url = https://github.com/google/docsy.git
47 changes: 47 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,53 @@ Symphony is an extensible system with the concept of providers. For each provide
* [The Symphony Book](./docs/README.md)
* [Set up a local environment](./test/localenv/README.md)

## Community

### Communication and Discord

All your contributions and suggestions are greatly appreciated! One of the easiest ways to contribute is to participate in Discord discussions, report issues, or join the monthly community calls.

### Questions and issues

Reach out with any questions you may have and we'll make sure to answer them as soon as possible. Community members, please feel free to jump in to join discussions or answer questions!

| Platform | Link |
|:----------|:------------|
| Discord | Join the [Discord server](https://discord.gg/JvY8qBkWbw)

### Email announcements

Want to stay up to date with Symphony releases, community calls, and other announcements? Join the Google Group to stay up to date on the latest Symphony news.

| Group | Link |
|:------|:-----|
| symphonyoss | Join the [symphonyoss Group](https://groups.google.com/g/symphonyoss)

### Community meetings

Every month we host a community call to showcase new features, review upcoming milestones, and engage in a Q&A. For community calls, anyone from the Symphony community can participate or present a topic. All are welcome!


You can always catch up offline by watching the recordings below.

| Asset | Link |
|:-----------|:------------|
| Meeting Link | [Teams Link](https://teams.microsoft.com/l/meetup-join/19%3ameeting_YWE0MTE5YTItN2RlMy00ODFkLWFlNGQtOTUyM2YzNWMwNzg2%40thread.v2/0?context=%7b%22Tid%22%3a%2272f988bf-86f1-41af-91ab-2d7cd011db47%22%2c%22Oid%22%3a%2203d4b2ae-f8d5-463c-8a45-2a8fb04390b7%22%7d)
| Meeting Recordings | [YouTube](https://www.youtube.com/@Eclipse-Symphony/videos)

### Upcoming calls

| Date & time |
|-------------|
| Wednesday December 11 <sup>th</sup>, 2024 8:00am Pacific Time (PST) |

### Previous calls

| Date & time |
|-------------|
| |


## Contributing

This project welcomes contributions and suggestions.
Expand Down
34 changes: 27 additions & 7 deletions api/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ ARG TARGETPLATFORM
ARG BUILDPLATFORM
ARG TARGETOS
ARG TARGETARCH
ARG FAULT_INJECTION_ENABLED=false

ENV CGO_ENABLED=0

Expand All @@ -23,23 +24,42 @@ COPY ./api /workspace/api
WORKDIR /workspace/api
# File permissions are not preserved when copying files in ADO.
RUN chmod +x pkg/apis/v1alpha1/providers/target/script/mock-*.sh

# Install gofail
RUN if [ "$FAULT_INJECTION_ENABLED" == "true" ]; then \
go install go.etcd.io/gofail@latest && \
find /workspace/api -type d | while read -r dir; do gofail enable $dir; done && \
find /workspace/coa -type d | while read -r dir; do gofail enable $dir; done && \
cd /workspace/api && go get go.etcd.io/gofail/runtime; \
fi
RUN CGO_ENABLED=${CGO_ENABLED} GOOS=${TARGETOS} GOARCH=${TARGETARCH} GODEBUG=netdns=cgo go build -o /dist/symphony-api

FROM ${TARGET_BASE_IMAGE}

ARG TARGETARCH

RUN \
set -x \
&& apt-get update \
&& apt-get install -y openssl libssl-dev ca-certificates curl jq android-tools-adb \
&& curl -fsSL -o get_helm.sh https://raw.githubusercontent.com/helm/helm/master/scripts/get-helm-3 \
&& chmod +x get_helm.sh \
&& ./get_helm.sh \
&& apt-get install -y openssl libssl-dev ca-certificates curl jq wget android-tools-adb \
&& if [ "${TARGETARCH}" = "arm64" ]; then \
wget -O helm-v3.16.2-linux-arm64.tar.gz https://get.helm.sh/helm-v3.16.2-linux-arm64.tar.gz && \
tar -zxvf helm-v3.16.2-linux-arm64.tar.gz && \
mv linux-arm64/helm /usr/local/bin/helm && \
chmod +x /usr/local/bin/helm; \
else \
curl -fsSL -o get_helm.sh https://raw.githubusercontent.com/helm/helm/master/scripts/get-helm-3 && \
chmod +x get_helm.sh && \
./get_helm.sh; \
fi \
&& apt upgrade -y
ADD https://github.com/golang/go/raw/master/lib/time/zoneinfo.zip /zoneinfo.zip
ENV ZONEINFO /zoneinfo.zip
ENV ZONEINFO=/zoneinfo.zip
COPY --from=build /dist /
ADD ./api/symphony-api.json /
EXPOSE 8080
EXPOSE 8081
ENV LOG_LEVEL Debug
ENV LOG_LEVEL=Debug
ENV GOFAIL_HTTP="127.0.0.1:22381"
# ENV CONFIG /symphony-api.json
CMD sh -c 'if [ -f /etc/pki/ca-trust/source/anchors/proxy-cert.crt ]; then update-ca-trust; fi && exec /symphony-api -c $CONFIG -l $LOG_LEVEL'
CMD sh -c 'if [ -f /etc/pki/ca-trust/source/anchors/proxy-cert.crt ]; then update-ca-trust; fi && exec /symphony-api -c $CONFIG -l $LOG_LEVEL'
24 changes: 17 additions & 7 deletions api/Dockerfile.poll-agent
Original file line number Diff line number Diff line change
Expand Up @@ -22,20 +22,30 @@ RUN chmod +x pkg/apis/v1alpha1/providers/target/script/mock-*.sh
RUN CGO_ENABLED=${CGO_ENABLED} GOOS=${TARGETOS} GOARCH=${TARGETARCH} GODEBUG=netdns=cgo go build -o /dist/symphony-api

FROM ubuntu:latest

ARG TARGETARCH

RUN \
set -x \
&& apt-get update \
&& apt-get install -y openssl libssl-dev ca-certificates curl jq android-tools-adb \
&& curl -fsSL -o get_helm.sh https://raw.githubusercontent.com/helm/helm/master/scripts/get-helm-3 \
&& chmod +x get_helm.sh \
&& ./get_helm.sh \
&& apt-get install -y openssl libssl-dev ca-certificates curl jq wget android-tools-adb \
&& if [ "${TARGETARCH}" = "arm64" ]; then \
wget -O helm-v3.16.2-linux-arm64.tar.gz https://get.helm.sh/helm-v3.16.2-linux-arm64.tar.gz && \
tar -zxvf helm-v3.16.2-linux-arm64.tar.gz && \
mv linux-arm64/helm /usr/local/bin/helm && \
chmod +x /usr/local/bin/helm; \
else \
curl -fsSL -o get_helm.sh https://raw.githubusercontent.com/helm/helm/master/scripts/get-helm-3 && \
chmod +x get_helm.sh && \
./get_helm.sh; \
fi \
&& apt upgrade -y
ADD https://github.com/golang/go/raw/master/lib/time/zoneinfo.zip /zoneinfo.zip
ENV ZONEINFO /zoneinfo.zip
ENV ZONEINFO=zoneinfo.zip
COPY --from=build /dist /
ADD ./api/symphony-k8s-poll-agent.json /
EXPOSE 8088
EXPOSE 8089
ENV LOG_LEVEL Debug
ENV CONFIG /symphony-k8s-poll-agent.json
ENV LOG_LEVEL=Debug
ENV CONFIG=/symphony-k8s-poll-agent.json
CMD exec /symphony-api -c $CONFIG -l $LOG_LEVEL
24 changes: 17 additions & 7 deletions api/Dockerfile.sidecar
Original file line number Diff line number Diff line change
Expand Up @@ -22,21 +22,31 @@ RUN chmod +x pkg/apis/v1alpha1/providers/target/script/mock-*.sh
RUN CGO_ENABLED=${CGO_ENABLED} GOOS=${TARGETOS} GOARCH=${TARGETARCH} GODEBUG=netdns=cgo go build -o /dist/symphony-api

FROM ubuntu:latest

ARG TARGETARCH

RUN \
set -x \
&& apt-get update \
&& apt-get install -y openssl libssl-dev ca-certificates curl jq android-tools-adb \
&& curl -fsSL -o get_helm.sh https://raw.githubusercontent.com/helm/helm/master/scripts/get-helm-3 \
&& chmod +x get_helm.sh \
&& ./get_helm.sh \
&& apt-get install -y openssl libssl-dev ca-certificates curl jq wget android-tools-adb \
&& if [ "${TARGETARCH}" = "arm64" ]; then \
wget -O helm-v3.16.2-linux-arm64.tar.gz https://get.helm.sh/helm-v3.16.2-linux-arm64.tar.gz && \
tar -zxvf helm-v3.16.2-linux-arm64.tar.gz && \
mv linux-arm64/helm /usr/local/bin/helm && \
chmod +x /usr/local/bin/helm; \
else \
curl -fsSL -o get_helm.sh https://raw.githubusercontent.com/helm/helm/master/scripts/get-helm-3 && \
chmod +x get_helm.sh && \
./get_helm.sh; \
fi \
&& apt upgrade -y
ADD https://github.com/golang/go/raw/master/lib/time/zoneinfo.zip /zoneinfo.zip
ENV ZONEINFO /zoneinfo.zip
ENV ZONEINFO=/zoneinfo.zip
COPY --from=build /dist /
ADD ./api/visualization-sidecar.json /
EXPOSE 8080
EXPOSE 8081
ENV LOG_LEVEL Debug
ENV LOG_LEVEL=Debug
# This needs to be commented out for automation/mage where the config is passed in as a parameter
ENV CONFIG /visualization-sidecar.json
ENV CONFIG=/visualization-sidecar.json
CMD exec /symphony-api -c $CONFIG -l $LOG_LEVEL
24 changes: 17 additions & 7 deletions api/Dockerfile.target-agent
Original file line number Diff line number Diff line change
Expand Up @@ -22,20 +22,30 @@ RUN chmod +x pkg/apis/v1alpha1/providers/target/script/mock-*.sh
RUN CGO_ENABLED=${CGO_ENABLED} GOOS=${TARGETOS} GOARCH=${TARGETARCH} GODEBUG=netdns=cgo go build -o /dist/symphony-api

FROM ubuntu:latest

ARG TARGETARCH

RUN \
set -x \
&& apt-get update \
&& apt-get install -y openssl libssl-dev ca-certificates curl jq android-tools-adb \
&& curl -fsSL -o get_helm.sh https://raw.githubusercontent.com/helm/helm/master/scripts/get-helm-3 \
&& chmod +x get_helm.sh \
&& ./get_helm.sh \
&& apt-get install -y openssl libssl-dev ca-certificates curl jq wget android-tools-adb \
&& if [ "${TARGETARCH}" = "arm64" ]; then \
wget -O helm-v3.16.2-linux-arm64.tar.gz https://get.helm.sh/helm-v3.16.2-linux-arm64.tar.gz && \
tar -zxvf helm-v3.16.2-linux-arm64.tar.gz && \
mv linux-arm64/helm /usr/local/bin/helm && \
chmod +x /usr/local/bin/helm; \
else \
curl -fsSL -o get_helm.sh https://raw.githubusercontent.com/helm/helm/master/scripts/get-helm-3 && \
chmod +x get_helm.sh && \
./get_helm.sh; \
fi \
&& apt upgrade -y
ADD https://github.com/golang/go/raw/master/lib/time/zoneinfo.zip /zoneinfo.zip
ENV ZONEINFO /zoneinfo.zip
ENV ZONEINFO=/zoneinfo.zip
COPY --from=build /dist /
ADD ./api/symphony-target-agent.json /
EXPOSE 8088
EXPOSE 8089
ENV LOG_LEVEL Debug
ENV CONFIG /symphony-target-agent.json
ENV LOG_LEVEL=Debug
ENV CONFIG=/symphony-target-agent.json
CMD exec /symphony-api -c $CONFIG -l $LOG_LEVEL
5 changes: 5 additions & 0 deletions api/constants/constants.go
Original file line number Diff line number Diff line change
Expand Up @@ -45,3 +45,8 @@ const (
API = "symphony-api"
EmitTimeFieldInUserLogs = "EMIT_TIME_FIELD_IN_USER_LOGS"
)

const (
Generation string = "generation"
Status string = "status"
)
Loading

0 comments on commit 8608689

Please sign in to comment.