link to newly created pekko samples (#299)

This commit is contained in:
PJ Fanning 2023-05-06 18:59:30 +01:00 committed by GitHub
parent 878ee613e0
commit fbbba72d8a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 8 additions and 103 deletions

View file

@ -14,7 +14,8 @@ To take advantage of running inside Kubernetes while forming a cluster,
with the Kubernetes API or Kubernetes via DNS.
You can look at the
@extref[Cluster with Kubernetes example project](akka-samples:akka-sample-cluster-kubernetes-java)
@java[[Cluster with Kubernetes example project](https://github.com/apache/incubator-pekko-samples/tree/main/pekko-sample-cluster-kubernetes-java)]
@scala[[Cluster with Kubernetes example project](https://github.com/apache/incubator-pekko-samples/tree/main/pekko-sample-cluster-kubernetes-scala)]
to see what this looks like in practice.
### Resource limits
@ -28,8 +29,8 @@ that you will need to take special care with the network configuration when usin
described here: @ref:[Pekko behind NAT or in a Docker container](../remoting-artery.md#remote-configuration-nat-artery)
You can look at the
@java[@extref[Cluster with docker-compse example project](akka-samples:akka-sample-cluster-docker-compose-java)]
@scala[@extref[Cluster with docker-compose example project](akka-samples:akka-sample-cluster-docker-compose-scala)]
@java[[Cluster with docker-compse example project](https://github.com/apache/incubator-pekko-samples/tree/main/pekko-sample-cluster-docker-compose-java)]
@scala[[Cluster with docker-compose example project](https://github.com/apache/incubator-pekko-samples/tree/main/pekko-sample-cluster-docker-compose-scala)]
to see what this looks like in practice.
For the JVM to run well in a Docker container, there are some general (not Pekko specific) parameters that might need tuning:

View file

@ -60,14 +60,15 @@ active-active persistent entities across data centers.
## Cluster with Docker
@java[@extref[Cluster with docker-compose example project](akka-samples:akka-sample-cluster-docker-compose-java)]
@scala[@extref[Cluster with docker-compose example project](akka-samples:akka-sample-cluster-docker-compose-scala)]
@java[[Cluster with docker-compose example project](https://github.com/apache/incubator-pekko-samples/tree/main/pekko-sample-cluster-docker-compose-java)]
@scala[[Cluster with docker-compose example project](https://github.com/apache/incubator-pekko-samples/tree/main/pekko-sample-cluster-docker-compose-scala)]
Illustrates how to use Pekko Cluster with Docker compose.
## Cluster with Kubernetes
@extref[Cluster with Kubernetes example project](akka-samples:akka-sample-cluster-kubernetes-java)
@java[[Cluster with Kubernetes example project](https://github.com/apache/incubator-pekko-samples/tree/main/pekko-sample-cluster-kubernetes-java)]
@scala[[Cluster with Kubernetes example project](https://github.com/apache/incubator-pekko-samples/tree/main/pekko-sample-cluster-kubernetes-scala)]
This sample illustrates how to form a Pekko Cluster with Pekko Bootstrap when running in Kubernetes.

View file

@ -36,7 +36,6 @@ object Paradox {
"extref.wikipedia.base_url" -> "https://en.wikipedia.org/wiki/%s",
"extref.github.base_url" -> (GitHub.url(version.value) + "/%s"), // for links to our sources
"extref.samples.base_url" -> s"$pekkoBaseURL/docs/pekko-samples/current/%s",
"extref.akka-samples.base_url" -> "https://developer.lightbend.com/start/?group=akka&project=%s",
"pekko.doc.dns" -> s"$pekkoBaseURL",
"scaladoc.pekko.base_url" -> s"$pekkoBaseURL/api/pekko/current/org/apache",
"scaladoc.pekko.http.base_url" -> s"$pekkoBaseURL/api/pekko-http/current/org/apache",

View file

@ -1,96 +0,0 @@
#!/usr/bin/env bash
#
# Publishes released sample zip files to Lightbend Activator.
# The zip files must have been uploaded to
# http://downloads.typesafe.com/akka/ before using this script.
# That is done by the release script.
#
# get the source location for this script; handles symlinks
function get_script_path {
local source="${BASH_SOURCE[0]}"
while [ -h "${source}" ] ; do
source="$(readlink "${source}")";
done
echo ${source}
}
# path, name, and dir for this script
declare -r script_path=$(get_script_path)
declare -r script_name=$(basename "${script_path}")
declare -r script_dir="$(cd -P "$(dirname "${script_path}")" && pwd)"
# echo a log message
function echolog {
echo "[${script_name}] $@"
}
# echo an error message
function echoerr {
echo "[${script_name}] $@" 1>&2
}
# fail the script with an error message
function fail {
echoerr "$@"
exit 1
}
# extract uuid property from json and show url of the status page
function logStatusUrl {
local prop="uuid"
local temp=`echo $json | sed 's/\\\\\//\//g' | sed 's/[{}]//g' | awk -v k="text" '{n=split($0,a,","); for (i=1; i<=n; i++) print a[i]}' | sed 's/\"\:\"/\|/g' | sed 's/[\,]/ /g' | sed 's/\"//g' | grep -w $prop`
echolog "Check status of $name at: https://www.lightbend.com/activator/template/status/${temp##*|}"
}
# print usage info
function usage {
cat <<EOM
Usage: ${script_name} [options] VERSION
-h | --help Print this usage message
-u | --user USER lightbend.com user name
-p | --password PASSWORD lightbend.com user password
EOM
}
# process options and set flags
while true; do
case "$1" in
-h | --help ) usage; exit 1 ;;
-u | --user ) user=$2; shift 2 ;;
-p | --password ) pwd=$2; shift 2 ;;
* ) break ;;
esac
done
if [ $# != "1" ]; then
usage
fail "A release version must be specified"
fi
if [ -z "$user" ]; then
usage
fail "user must be specified"
fi
if [ -z "$pwd" ]; then
usage
fail "password must be specified"
fi
declare -r version=$1
# check for a curl command
type -P curl &> /dev/null || fail "curl command not found"
names=`find akka-samples -name "activator.properties" -depth 2 | awk -F"/" '{printf "%s\n",$2}'`
for name in $names; do
echolog "Publishing $name"
json=$(curl --data-urlencode "url=http://downloads.lightbend.com/akka/$name-$version.zip" --user "$user:$pwd" --progress-bar https://www.lightbend.com/activator/template/publish)
logStatusUrl
done