Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[do not review] test forks #41

Closed
wants to merge 50 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
50 commits
Select commit Hold shift + click to select a range
79592ae
Add Kubernetes recipe
AaronCrawfis Apr 4, 2023
37af720
Merge branch 'edge'
AaronCrawfis Apr 5, 2023
1f8ebd3
Add Recipes publishing pipeline (#6)
AaronCrawfis Apr 6, 2023
535f85e
Add resource output to redis-kubernetes
AaronCrawfis Apr 6, 2023
72c7c69
Remove ref condition
AaronCrawfis Apr 6, 2023
b51b4d6
Remove dependency
AaronCrawfis Apr 6, 2023
f83863b
Add a Redis Cache for Azure Recipe (#4)
jasonviviano Apr 7, 2023
5ec04c9
Switch to sslPort
AaronCrawfis Apr 18, 2023
7cb9926
Update azure.bicep
AaronCrawfis Apr 19, 2023
d4ec2f4
Azure redis cache connection string update (#8)
jasonviviano Apr 20, 2023
3e0fd49
Improvements to Redis dev recipe (#10)
rynowak May 15, 2023
65b9973
Update license and copyright (#11)
vinayada1 May 22, 2023
6bb9411
Update directories to be pack-based instead of type-based (#12)
AaronCrawfis May 22, 2023
6709e76
Use REL_TAG (#14)
AaronCrawfis May 23, 2023
51b5a8f
Adjust copyright blurb spacing (#15)
vinayada1 May 25, 2023
129a0b5
Trigger on version tag
AaronCrawfis May 26, 2023
1296ca9
Edit publish trigger logic
AaronCrawfis May 26, 2023
2e4781f
Use edge rad-bicep
AaronCrawfis May 26, 2023
4adeefe
Publish both TAG and CHANNEL
AaronCrawfis May 26, 2023
7fc586e
Add Issue templates
AaronCrawfis Jun 7, 2023
9a7f0db
Add README and CONTRIBUTING to Recipes repo (#16)
AaronCrawfis Jun 7, 2023
25ac8d3
Add code of conduct
AaronCrawfis Jun 7, 2023
bdd778c
change mentions of <Project Radius> to just <Radius> (#17)
willtsai Jun 12, 2023
2c64c36
Add note on rad init
AaronCrawfis Jun 12, 2023
fce11d1
Add dev recipe for Mongo (#18)
AaronCrawfis Jun 12, 2023
fe96943
Add mongo to README
AaronCrawfis Jun 21, 2023
f77903b
Add Dapr State Store Dev Recipe (#20)
AaronCrawfis Jul 5, 2023
7ce02d5
Add SQL dev recipe (#19)
AaronCrawfis Jul 5, 2023
3ca8499
Rename directory to local-dev (#25)
AaronCrawfis Jul 18, 2023
2b8aed4
Add Dapr PubSub dev recipe (#21)
AaronCrawfis Jul 21, 2023
802f8bc
Add a local-dev Dapr secret store recipe (#27)
AaronCrawfis Jul 21, 2023
ac779e4
Remove connection string and add 'tls' (#23)
Reshrahim Jul 26, 2023
989f262
Add Rabbit MQ dev recipe (#22)
AaronCrawfis Aug 4, 2023
7e1ef45
Add recipes required for eshop (#24)
willdavsmith Aug 10, 2023
7f0016f
Add resource column
AaronCrawfis Aug 17, 2023
8c193ca
renaming (#30)
nithyatsu Aug 30, 2023
2ab9bc8
rename ref to Applications.Link resources (#31)
lakshmimsft Sep 1, 2023
dbdaba1
Rename recipes for new resource types
AaronCrawfis Sep 13, 2023
29b2242
Replacing instances of `radius.dev` with `radapp.io` (#33)
willdavsmith Oct 3, 2023
302770c
Updating recipes to work for eshop (#29)
willdavsmith Oct 10, 2023
927659f
Fix casing (#34)
Reshrahim Oct 11, 2023
9d6a71e
SQL recipe updates (#35)
willdavsmith Oct 13, 2023
d132a45
Migrate to GHCR (#36)
willdavsmith Oct 16, 2023
8bf6467
Fix GHCR public publishing issue (#37)
willdavsmith Oct 16, 2023
797fae6
Update rad cli download URL (#38)
willdavsmith Oct 18, 2023
54c77b7
Fix rad cli download in public push (#39)
willdavsmith Oct 18, 2023
58c7bce
Update README.md
AaronCrawfis Oct 19, 2023
cadb242
wip
nithyatsu Oct 25, 2023
6c190de
delete ghcr related actions
nithyatsu Oct 26, 2023
1bb5e4c
wip
nithyatsu Oct 26, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 38 additions & 0 deletions .github/ISSUE_TEMPLATE/bug.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
---
name: Bug Report
about: Report broken functionality within Radius Recipes
title: "<BUG TITLE>"
assignees: ''
labels: ["bug"]
---

## Bug information

### Steps to reproduce (required)
<!--How can we recreate this bug? Be specific-->

### Observed behavior (required)
<!--What you're experiencing that you believe is a bug-->

<!--If applicable, add screenshots to help explain your problem-->

### Desired behavior (required)
<!--What you're expecting to happen-->

### Workaround (optional)
<!--Have you found a workaround to get you unblocked?-->

## System information

### rad Version (required)
<!--What rad cli version are you running?-->

<!-- PASTE OUTPUT OF `rad version` -->

### Operating system (required)
<!--What operating system (macOS Monterey, Windows 11, etc.) and architecture (x86, x64, arm64, etc.) are you running?-->

<!-- For example: macOS Monterey, M1 chip -->

## Additional context
<!--Add any other context about the problem here-->
18 changes: 18 additions & 0 deletions .github/ISSUE_TEMPLATE/feature.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
---
name: Feature Request
about: Request a feature in Radius Recipes
title: "<FEATURE TITLE>"
assignees: ''
---

## Overview of feature request

<!--What are you proposing Radius add/update/remove?-->

## Acceptance criteria

<!--What will need to be completed/working for this feature to be marked "Done"-->

## Additional context

<!--Add any other context about the problem here-->
40 changes: 40 additions & 0 deletions .github/scripts/delete-recipes.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
#! /bin/bash

# Fail immediately if any command fails
set -e

# Get command line arguments
GHCR_ORG=$1
GHCR_PATH=$2
RECIPE_VERSION=$2

# Print usage information
function print_usage() {
echo "Usage: $0 <GHCR_ORG> <RECIPE_VERSION>"
echo " Deletes all recipes in the repository from the GitHub Container Registry. Requires you to be logged into GitHub."
echo " GHCR_ORG: Organization name of the GitHub Container Registry. For example, radius-project"
echo " GHCR_PATH: Path name for Recipe storage. For example, recipes"
echo " RECIPE_VERSION: Version of the recipe to publish. For example, 1.0"
}

# Verify that the required arguments are present
if [ -z "$GHCR_ORG" ] || [ -z "$GHCR_PATH" ] || [ -z "$RECIPE_VERSION" ]; then
echo "Missing required arguments"
print_usage
exit 1
fi

for RECIPE in $(find . -type f -name "*.bicep")
do
# Get the recipe name and directory name
# ./azure/redis-azure.bicep -> redis-azure and azure, respectively
export FILE_NAME=$(basename $RECIPE | cut -d. -f1)
export DIR_NAME=$(dirname $RECIPE | cut -d/ -f2)

echo "Deleting ghcr.io/$GHCR_ORG/$GHCR_PATH/$DIR_NAME/$FILE_NAME:$RECIPE_VERSION"
gh api \
--method DELETE \
-H "Accept: application/vnd.github+json" \
-H "X-GitHub-Api-Version: 2022-11-28" \
/orgs/$GHCR_ORG/packages/container/$GHCR_PATH/$DIR_NAME/$FILE_NAME:$RECIPE_VERSION
done
40 changes: 37 additions & 3 deletions .github/scripts/get_release_version.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,17 @@
# ------------------------------------------------------------
# Copyright (c) Microsoft Corporation.
# Licensed under the MIT License.
# Copyright 2023 The Radius Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# ------------------------------------------------------------

# This script parses release version from Git tag and set the parsed version to
Expand Down Expand Up @@ -46,6 +57,10 @@
print("Setting: {}".format(channel))
githubEnv.write(channel + "\n")

tag = "REL_TAG=local"
print("Setting: {}".format(tag))
githubEnv.write(tag + "\n")

sys.exit(0)

match = re.search(pullRefRegex, gitRef)
Expand All @@ -60,6 +75,10 @@
print("Setting: {}".format(channel))
githubEnv.write(channel + "\n")

tag = "REL_TAG=pr-{}".format(match.group(1))
print("Setting: {}".format(tag))
githubEnv.write(tag + "\n")

sys.exit(0)

match = re.search(tagRefRegex, gitRef)
Expand All @@ -77,8 +96,13 @@
print("Setting: {}".format(channel))
githubEnv.write(channel + "\n")

tag = "REL_TAG={}".format(match.group("version"))
print("Setting: {}".format(tag))
githubEnv.write(tag + "\n")

print("Setting: UPDATE_RELEASE=true")
githubEnv.write("UPDATE_RELEASE=true" + "\n")

sys.exit(0)

else:
Expand All @@ -91,6 +115,11 @@
channel = "REL_CHANNEL={}".format(match.group("version"))
print("Setting: {}".format(channel))
githubEnv.write(channel + "\n")

tag = "REL_TAG={}".format(match.group("version"))
print("Setting: {}".format(tag))
githubEnv.write(tag + "\n")

sys.exit(0)

print("This is a normal build")
Expand All @@ -100,4 +129,9 @@

channel = "REL_CHANNEL=edge"
print("Setting: {}".format(channel))
githubEnv.write(channel + "\n")
githubEnv.write(channel + "\n")

tag = "REL_TAG=latest"
print("Setting: {}".format(tag))
githubEnv.write(tag + "\n")

43 changes: 43 additions & 0 deletions .github/scripts/publish-recipes.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
#! /bin/bash

# Fail immediately if any command fails
set -e

# Get command line arguments
GHCR_ORG=$1
GHCR_PATH=$2
RECIPE_VERSION=$3

# Print usage information
function print_usage() {
echo "Usage: $0 <GHCR_ORG> <RECIPE_VERSION>"
echo " Publishes all recipes in the repository to the GitHub Container Registry. Requires you to be logged into GitHub"
echo " GHCR_ORG: Organization name of the GitHub Container Registry. For example, radius-project"
echo " GHCR_PATH: Path name for Recipe storage. For example, recipes"
echo " RECIPE_VERSION: Version of the recipe to publish. For example, 1.0"
}

# Verify that the required arguments are present
if [ -z "$GHCR_ORG" ] || [ -z "$GHCR_PATH" ] || [ -z "$RECIPE_VERSION" ]; then
echo "Missing required arguments"
print_usage
exit 1
fi

# We create output that's intended to be consumed by the GitHub Action summary. If we're
# not running in a GitHub Action, we'll just silence the output.
if [[ -z "$GITHUB_STEP_SUMMARY" ]]; then
GITHUB_STEP_SUMMARY=/dev/null
fi

echo "## Recipes published to ghcr.io/$GHCR_ORG/$GHCR_PATH" >> $GITHUB_STEP_SUMMARY
for RECIPE in $(find . -type f -name "*.bicep")
do
# Get the platform (file) name and resource (directory) name
export FILE_NAME=$(basename $RECIPE | cut -d. -f1) # rediscaches
export DIR_NAME=$(dirname $RECIPE | cut -d/ -f2) # dev

echo "Publishing $DIR_NAME/$FILE_NAME to ghcr.io/$GHCR_ORG/$GHCR_PATH from $RECIPE"
echo "- ghcr.io/$GHCR_ORG/$GHCR_PATH/$DIR_NAME/$FILE_NAME:$RECIPE_VERSION" >> $GITHUB_STEP_SUMMARY
rad bicep publish --file $RECIPE --target "br:ghcr.io/$GHCR_ORG/$GHCR_PATH/$DIR_NAME/$FILE_NAME:$RECIPE_VERSION"
done
21 changes: 13 additions & 8 deletions .github/workflows/validate-bicep.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,17 @@
# ------------------------------------------------------------
# Copyright (c) Microsoft Corporation.
# Licensed under the MIT License.
# Copyright 2023 The Radius Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# ------------------------------------------------------------

name: Validate Bicep Code
Expand All @@ -26,12 +37,6 @@ jobs:
steps:
- name: Check out repo
uses: actions/checkout@v3
- name: az CLI login
run: |
az login --service-principal \
--username ${{ secrets.AZURE_SP_TESTS_APPID }} \
--password ${{ secrets.AZURE_SP_TESTS_PASSWORD }} \
--tenant ${{ secrets.AZURE_SP_TESTS_TENANTID }}
- name: Parse release version and set environment variables
run: python ./.github/scripts/get_release_version.py
- name: Download rad-bicep
Expand Down
69 changes: 69 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
# Contribution Guidelines

Thank you for your interest in Radius!

This project has adopted the [Contributor Covenant Code of Conduct](https://github.com/radius-project/radius/blob/main/CODE-OF-CONDUCT.md).

Contributions come in many forms: submitting issues, writing code, participating in discussions and community calls.

This document provides the guidelines for how to contribute to the Radius project.

## Issues

This section describes the guidelines for submitting issues

### Issue Types

There are 2 types of issues:

- bug: You've found a bug with the code, and want to report it, or create an issue to track the bug.
- feature: Used for items that propose a new idea or functionality. This allows feedback from others before code is written.

> For questions or feedback please refer to the [Radius Community docs](https://docs.radapp.dev/community/). Discord will be the best way to get in touch with the community and the maintainers.

### Before You File

Before you file an issue, make sure you've checked the following:

1. Is it the right repository?
- The Radius project is distributed across multiple repositories. Check the list of [repositories](https://github.com/radius-project) if you aren't sure which repo is the correct one.
1. Check for existing issues
- Before you create a new issue, please do a search in [open issues](https://github.com/radius-project/recipes/issues) to see if the issue or feature request has already been filed.
- If you find your issue already exists, make relevant comments and add your [reaction](https://github.com/blog/2119-add-reaction-to-pull-requests-issues-and-comments). Use a reaction:
- 👍 up-vote
- 👎 down-vote
1. For bugs
- Check it's not an environment issue. For example, if running on Kubernetes, make sure prerequisites are in place.
- Ensure you have as much data as possible. This usually comes in the form of logs and/or stacktrace. If running on Kubernetes or other environment, look at the logs of the Radius services (UCP, RP, DE). More details on how to get logs can be found [here](https://docs.radapp.dev/reference/troubleshooting-radius/).
1. For proposals
- Many changes to the Radius runtime may require changes to the API. In that case, the best place to discuss the potential feature is the main [Radius repo](https://github.com/radius-project/radius).
- Recipes runtime changes can be discussed in the [Radius repo](https://github.com/radius-project/radius).
- Community Recipes can be discussed within [this repo](https://github.com/radius-project/recipes/issues).

## Contributing to Radius Recipes

This section describes the guidelines for contributing code / docs to Radius Recipes.

### Prerequisites

Make sure you are familiar with how to author and test Recipes. The [custom Recipes docs](https://docs.radapp.dev/operations/custom-recipes/) will walk you through the process. Make sure to test with your own registry and environment before submitting a PR.

### Pull Requests

All contributions come through pull requests. To submit a proposed change, we recommend following this workflow:

1. Make sure there's an issue (bug or feature) raised, which sets the expectations for the contribution you are about to make.
1. Fork the relevant repo and create a new branch
1. Create your change
1. Update relevant documentation for the change
1. Commit and open a PR
1. Wait for the CI process to finish and make sure all checks are green
1. A maintainer of the repo will be assigned, and you can expect a review within a few days

#### Use work-in-progress PRs for early feedback

A good way to communicate before investing too much time is to create a draft PR and share it with your reviewers. The standard way of doing this is to mark your PR as draft within GitHub.

## Thank You!

Your contributions to open source, large or small, make projects like this possible. Thank you for taking the time to contribute.
Loading